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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -