Hi , i want to remove the default orange focus color from GridView and from the EditText. I have tried the android:focusable="false" but it is not working.Can any one help me if you have gone through this problem before?????
Thanks in advance.
Hi , i want to remove the default orange focus color from GridView and from the EditText. I have tried the android:focusable="false" but it is not working.Can any one help me if you have gone through this problem before?????
Thanks in advance.
I think if this works as the other views, you have to use a selector in which you define various states for your view. A selector is a drawable (stored in the drawable folder) and you use it as if it was just an image. For instance, you could do something like that, if you want the focus to be red instead of orange : selectorgridview.xml :
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_focused="true" android:color="@color/darkred" />
<item android:color="@color/white" />
</selector>
Then, you put the background of your GridView
with it : android:background="selectorgridview"
I actually never tried it on a GridView
but I think it works as the other views. More infos in the docs from google