Android Studio 笔记 常见属性 style等

常见属性记

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签名。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值