You can create a xml file under res/drawable. For example: res/ drawable/text_style.xml
Here is the content: <?xml version="1.0" encoding="UTF-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" android:drawable="@drawable/ shape_2" /> <item android:state_focused="true" android:state_enabled="true" android:drawable="@drawable/shape_5" /> </selector> Here is shape_2.xml <shape xmlns:android="http://schemas.android.com/apk/res/android"> <solid android:color="#FF0000FF"/> <stroke android:width="4dp" android:color="#FFFFFFFF" android:dashWidth="1dp" android:dashGap="2dp" /> <padding android:left="7dp" android:top="7dp" android:right="7dp" android:bottom="7dp" /> <corners android:radius="4dp" /> </shape> On Aug 3, 7:21 pm, n179911 <n179...@gmail.com> wrote: > Hi, > > In android, how can I specify a border color for an Image View when it > has focus? > e.g. how to put an orange border around an Image View when it has focus? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---