This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { mavenCentral() } | |
dependencies { classpath 'com.android.tools.build:gradle:1.0.0' } | |
} | |
apply plugin: 'com.android.application' | |
dependencies { | |
compile 'com.android.support:support-v4:21.0.0' | |
compile 'com.google.android.gms:play-services:+' | |
compile project(':CommonAdLib:CommonAdLib') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.nio.file.Files | |
import java.nio.file.Paths | |
import java.nio.file.StandardCopyOption | |
def renameImages(def dirPath,def saveDirPath){ | |
new File(saveDirPath).mkdirs() | |
def dirFile=new File(dirPath) | |
dirFile.listFiles().eachWithIndex {inFile,i-> | |
String name=inFile.getName() | |
def number=Math.pow(2, i+1) as int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.codehaus.groovy.runtime.StringBufferWriter; | |
def downloadSingleImage(String imageUrl, String savePath) { | |
try { | |
URL url = new URL(imageUrl); | |
HttpURLConnection connection = (HttpURLConnection) url.openConnection(); | |
DataInputStream is = new DataInputStream(connection.getInputStream()); | |
FileOutputStream fos=new FileOutputStream(savePath) | |
DataOutputStream os = new DataOutputStream(fos); | |
byte[] buffer = new byte[4096]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.diao.tools.copyright; | |
import java.awt.Color; | |
import java.awt.Font; | |
import java.awt.Graphics2D; | |
import java.awt.font.LineBreakMeasurer; | |
import java.awt.font.TextLayout; | |
import java.awt.image.BufferedImage; | |
import java.io.BufferedReader; | |
import java.io.File; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
echo ====== | |
echo The Argument Specification of ImageResizer.jar | |
echo arg1: Original image file path | |
echo arg2: Output image file path | |
echo arg3: Output image format. Only support JPEG,PNG,BMP,WBMP,GIF. | |
echo arg4: Output image width | |
echo arg5: Output image height | |
echo ------ | |
echo Start converting... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.pinnedheaderlistviewtest; | |
import java.util.ArrayList; | |
import java.util.List; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.widget.ArrayAdapter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
The MIT License (MIT) | |
Copyright (c) 2014 singwhatiwanna | |
https://github.com/singwhatiwanna | |
http://blog.csdn.net/singwhatiwanna | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.matrixxun.pulltozoomlistsimple; | |
import android.content.Context; | |
import android.os.SystemClock; | |
import android.util.AttributeSet; | |
import android.util.DisplayMetrics; | |
import android.util.Log; | |
import android.view.MotionEvent; | |
import android.view.ViewGroup; | |
import android.view.WindowManager; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(1)http://stackoverflow.com/questions/4435773/android-proguard-removing-all-log-statements-and-merging-packages | |
(2)http://stackoverflow.com/questions/7086920/removing-logging-with-proguard-doesnt-remove-the-strings-being-logged | |
在开发android的时候,经常要使用Log.d()语句,但是发布的时候,如果一行一行的注释还是有点麻烦的. | |
这个时候可以使用如下的指令让proguard帮助我们删除他: | |
-assumenosideeffects class android.util.Log{ public static *** d(...); public static *** i(...); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.glowbuttontest; | |
import java.lang.ref.WeakReference; | |
import android.content.Context; | |
import android.graphics.Canvas; | |
import android.graphics.Paint; | |
import android.os.Handler; | |
import android.os.Message; | |
import android.util.AttributeSet; |
NewerOlder