常见属性记
style
android:windowNoTitle 设置有没有标题栏true|false
android:windowFullScreen 设置全屏true|false
android:windowIsFloating 设置是否浮现在activity之上true|false
android:windowIsTranslucent 设置window是否为透明
android:windowBackground 设置window的背景颜色
android:windowContentOverlay这个是定义contentoverlay的背景的
android:windowFrame 是否有边框
android:backgroundDimEnabled true 背景变暗
android:backgroundDimAmount = 0.6 灰度
colorAccent:各控制元件(如:check box、switch 或是 radoi) 被勾选 (checked) 或是选定 (selected) 的颜色。
在 style 的属性中设置。
colorControlNormal : 各控制元件的预设颜色。
在 style 的属性中设置
textColorPrimary: App bar 上的标题与更多菜单中的文字颜色。
在 style 的属性中设置。
模糊效果
protected void bindView(Bundle savedInstanceState) {
Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.mipmap.girl2);
textView.setBackground(new BitmapDrawable(getFlur(bitmap)));
}
public Bitmap getFlur(Bitmap sentBitmap){
Bitmap bitmap = sentBitmap.copy(sentBitmap.getConfig(), true);
final RenderScript rs = RenderScript.create(this);
final Allocation input = Allocation.createFromBitmap(rs, sentBitmap, Allocation.MipmapControl.MIPMAP_NONE,
Allocation.USAGE_SCRIPT);
final Allocation output = Allocation.createTyped(rs, input.getType());
final ScriptIntrinsicBlur script = ScriptIntrinsicBlur.create(rs, Element.U8_4(rs));
script.setRadius(20 /* e.g. 3.f */);
script.setInput(input);
script.forEach(output);
output.copyTo(bitmap);
return bitmap;
}
Android Studio找Sha1不好找,然后从一篇博客评论中找到了一个高大上的做法,特地来记录一下
为了避免注册时弄错签名,建议直接用打包出来的apk查看签名,具体如下:
1) 将apk修改后缀为 .rar文件后解压;
2) 进入解压后的META-INF目录,该目录下会存在文件CERT.RSA
3) 在该目录下打开cmd,输入命令 :keytool -printcert -file CERT.RSA
这里将会显示出MD5和SHA1签名。