Android全屏设置、控件透明度,色值透明对照

1requestWindowFeature(Window.FEATURE_NO_TITLE);// 隐藏标题,顶部的系统栏不会被覆盖。注意,要放在setcontentview前面,要不然运行会报错。

//		getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
//		WindowManager.LayoutParams.FLAG_FULLSCREEN);// 设置全屏,顶部的系统栏会被覆盖


activity透明三步走
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        StatusBarUtils.transportStatus(this, getResources().getColor(R.color.transparent));
        this.getSupportActionBar().hide();
对应activity的配置
        <activity
                android:name=".activity.SimpleAdvertiseDialogActivity"
                android:configChanges="orientation|keyboardHidden|screenSize"
                android:taskAffinity=".activity.simpleadvertise"
                android:launchMode="singleTask"
                android:screenOrientation="portrait"
                android:theme = "@style/TranslucentTheme"/>



2、控件名.getBackground().setAlpha(150);//int 在0-255之间值越大,透明度越低

3、    半透明  Button android:background="#e0000000" 
		  透明    Button android:background="#00000000"   

	#66000000

	半透明颜色 前2位是透明度,后6位是颜色。
	不透明 100% FF
	95% F2
	90% E6
	85% D9
	80% CC
	75% BF
	70% B3
	65% A6
	60% 99
	55% 8C
	半透明 50% 80
	45% 73
	40% 66
	35% 59
	30% 4D
	25% 40
	20% 33
	15% 26
	10% 1A
	5% 0D
	全透明 0% 00



不透明度16进制值:

    <color name="lock_screen_text_shadow_grey_color">#40757575</color>

40表示值,757575表示颜色
不透明度% ——值                 

100% — FF
99% — FC           
98% — FA
97% — F7
96% — F5
95% — F2
94% — F0
93% — ED
92% — EB
91% — E8
90% — E6
89% — E3
88% — E0
87% — DE
86% — DB
85% — D9
84% — D6
83% — D4
82% — D1
81% — CF
80% — CC
79% — C9
78% — C7
77% — C4
76% — C2
75% — BF
74% — BD
73% — BA
72% — B8
71% — B5
70% — B3
69% — B0
68% — AD
67% — AB
66% — A8
65% — A6
64% — A3
63% — A1
62%9E
61%9C
60%99
59%96
58%94
57%91
56%8F
55%8C
54%8A
53%87
52%85
51%82
50%80
49%7D
48%7A
47%78
46%75
45%73
44%70
43%6E
42%6B
41%69
40%66
39%63
38%61
37%5E
36%5C
35%59
34%57
33%54
32%52
31%4F
30%4D
29%4A
28%47
27%45
26%42
25%40
24%3D
23%3B
22%38
21%36
20%33
19%30
18%2E
17%2B
16%29
15%26
14%24
13%21
12%1F
11%1C
10%1A
9%17
8%14
7%12
6%0F
5%0D
4%0A
3%08
2%05
1%03
0%00


		      
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

jian11058

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值