Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- list_selector устанавливаю в GridView, вместо стандартного GridView
- <?xml version="1.0" encoding="utf-8"?>
- <selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true">
- <shape android:shape="rectangle">
- <solid android:color="#f00fff"/>
- </shape>
- </item>
- <item android:state_focused="true">
- <shape android:shape="rectangle">
- <solid android:color="#000fff"/>
- </shape>
- </item>
- <item>
- <shape android:shape="rectangle">
- <solid android:color="#ff1118"/>
- </shape>
- </item>
- </selector>
- BACKGROUND LinearLayout для item.xml
- <?xml version="1.0" encoding="utf-8"?>
- <selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="false">
- <shape android:shape="rectangle">
- <gradient android:type="linear"
- android:startColor="#626262"
- android:endColor="#515151"
- android:angle="270"/>
- </shape>
- </item>
- </selector>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement