CustomUI
项目常用的自定义UI库
Install / Use
/learn @lianghuiyong/CustomUIREADME
Gradle
compile 'com.better.android:customui:x.y.z'
Color-Style
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!--pressed-->
<item android:color="#CC3835" android:state_pressed="true" />
<!--disable-->
<item android:color="#1ACC3835" android:state_enabled="false" />
<!--normal-->
<item android:color="#EE2420"/>
</selector>
说明
app:stroke :细线宽度(不设置时,背景色会铺满按钮)
app:radius :拐角半径
app:buttonColor: 按钮颜色(支持Color style
示例
ShapeButton | Explain | Sample --- | --- | --- Enable | <div><img src="http://oeqej1j2m.bkt.clouddn.com/ShapeButton_2_05.gif" width="300"></div>| app:radius="1.5dp" <br> app:stroke="0.2dp" <br> app:buttonColor="@color/green" Disable | <div><img src="http://oeqej1j2m.bkt.clouddn.com/ShapeButton_2_06.gif" width="300"></div>| android:enabled="false" <br> app:radius="1.5dp" <br> app:stroke="0.2dp" <br> app:buttonColor="@color/green" Enable | <div><img src="http://oeqej1j2m.bkt.clouddn.com/ShapeButton_2_07.gif" width="300"></div>| app:radius="1.5dp" <br> app:buttonColor="@color/green" Disable | <div><img src="http://oeqej1j2m.bkt.clouddn.com/ShapeButton_2_08.gif" width="300"></div>| android:enabled="false" <br> app:radius="1.5dp" <br> app:buttonColor="@color/green"
ShapeEditText | Explain | Sample --- | --- | --- Enable | <div><img src="http://oeqej1j2m.bkt.clouddn.com/ShapeEditText_2_13.gif" width="300"></div>| app:radius="1.5dp" <br> app:stroke="0.2dp" <br> app:buttonColor="@color/green" Disable | <div><img src="http://oeqej1j2m.bkt.clouddn.com/ShapeEditText_2_14.gif" width="300"></div>| android:enabled="false" <br> app:radius="1.5dp" <br> app:stroke="0.2dp" <br> app:buttonColor="@color/green"
