android - Change external shape color in XML -
so, if have shape:
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > <corners android:radius="10dp"/> </shape> and want have shape in selector:
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/somedrawable" android:state_focused="true" android:state_pressed="true"/> <item android:drawable="@drawable/someotherdrawable" android:state_focused="false" android:state_pressed="true"/> <item android:drawable="@drawable/someotherotherdrawable"/> </selector> how use shape in selector , set color of it? possible in in xml? have use <include /> tag this:
<item > <include layout="@drawable/myshape" android:color="#987" /> </item>
Comments
Post a Comment