android - How to change textview shadow color for onclick -
is thr way change textview text shadow color
simillar changing text color
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:color="@color/white" android:state_focused="true"/> <!-- focused --> <item android:color="@color/white" android:state_focused="true" android:state_pressed="true"/> <!-- focused , pressed --> <item android:color="@color/white" android:state_pressed="true" /> <!-- pressed --> <item android:color="@color/black"/> <!-- default -->
create style in styles.xml
<style name="myshadowstyle"> <item name="android:shadowcolor">#ff8800</item> <item name="android:shadowradius">2</item> </style>
now in selector xml
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item style="@style/myshadowstyle" android:state_focused="true"/> <!-- focused --> <item style="@style/myshadowstyle" android:state_focused="true" android:state_pressed="true"/> <!-- focused , pressed --> <item style="@style/myshadowstyle" android:state_pressed="true" /> <!-- pressed --> <item android:color="@color/black"/> </selector>
Comments
Post a Comment