首页
IT
登录
6mi
u
盘
搜
搜 索
IT
背景选择器常见错误
背景选择器常见错误
xiaoxiao
2022-06-24
62
1.button背景选择器必须加上形状:
<
item
android:state_pressed
=
"true"
>
<
shape
android:shape
=
"rectangle"
>
<
solid
android:color
=
"#F39800"
>
</
solid
>
</
shape
>
</
item
>
<
item
android:state_pressed
=
"false"
>
<
shape
android:shape
=
"rectangle"
>
<
solid
android:color
=
"#D7D7D7"
>
</
solid
>
</
shape
>
</
item
>
2.不加形状,会报错的
<
item
android:state_pressed
=
"true"
android:color
=
"#D7D7D7"
>
</
item
>
<
item
android:state_pressed
=
"false"
android:color
=
"#97F765"
>
</
item
>
转载请注明原文地址: https://ju.6miu.com/read-1123959.html
专利
最新回复
(
0
)