前端之家收集整理的这篇文章主要介绍了
xml不同状态的显示,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false"><shape android:shape="rectangle">
<solid android:color="#90fafafa" />
<corners android:radius="5dp" />
</shape></item>
<item android:state_pressed="true"><shape android:shape="rectangle">
<solid android:color="#90ffffff" />
<corners android:radius="5dp" />
</shape></item>
<item android:state_focused="false" android:state_pressed="false">
<shape android:shape="rectangle">
<solid android:color="@color/white_title" />
<corners android:radius="5dp" />
</shape></item>
</selector>
原文链接:https://www.f2er.com/xml/293914.html