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
public class CircleDrawable extends Drawable { | |
private Paint mPaint; | |
private int mWidth; | |
private Bitmap mBitmap; | |
public CircleDrawable(Bitmap bitmap) { | |
this.mBitmap = bitmap; | |
BitmapShader bitmapShader = new BitmapShader(bitmap, Shader.TileMode.CLAMP, | |
Shader.TileMode.CLAMP); |
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
http://schemas.android.com/apk/res-auto | |
‘set locale environment variables on startup |
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
private XmlResourceParser createParser(byte[] data) throws Exception { | |
Class<?> blockCls = Class.forName("android.content.res.XmlBlock"); | |
Constructor<?> constructor = blockCls.getDeclaredConstructor(byte[].class); | |
constructor.setAccessible(true); | |
Object block = constructor.newInstance(new Object[]{data}); | |
Method method = blockCls.getDeclaredMethod("newParser"); | |
method.setAccessible(true); | |
return (XmlResourceParser) method.invoke(block); | |
} |
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
mount -o remount rw /system |
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
= 相等 | |
!= 不等 | |
-n 非空字符串 | |
-z 空字符串 | |
> 大于 | |
< 小于 | |
a file exists. |
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
生成签名的命令 | |
keytool -genkey -alias browser -keyalg RSA -validity 20000 -keystore android.keystore | |
别名为browser | |
密码会在生成过程中提示 | |
签名的命令 | |
jarsigner -sigalg SHA1withRSA -digestalg SHA1 -keystore android.keystore -storepass maxthon c.apk "browser" |
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 $(cd "$(dirname "$0")"; pwd) | |
#取最后一列 | |
awk -F',' '{print $NF}' | |
52 05 * * * /data/pitayaplay2015/AdPy/bin/report.sh -m | |
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
引用本地的aar | |
生成aar之后下一步就是如何引用本地的aar文件?本地的aar文件并没有像引用jar文件这么简单,官方也没有提供解决方案。好在国外的一些前辈总结出了方法,下面就以test.aar文件为例来详述下方法 | |
1、把aar文件放在一个文件目录内,比如就放在libs目录内 | |
2、在app的build.gradle文件添加如下内容 | |
repositories { | |
flatDir { | |
dirs 'libs' //this way we can find the .aar file in libs folder |
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
//测试是否截图成功 | |
(Color.alpha(thumbnail.getPixel(0, 0)) == 0) | |
//animator动画参数 | |
fillBefore是指动画结束时画面停留在此动画的第一帧; 默认值为true | |
fillAfter是指动画结束是画面停留在此动画的最后一帧。默认值为false | |
android:startOffset="3000" 表示延迟3秒后再执行 |
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
document.body.onclick=function() { alert(this.id); } |
OlderNewer