Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2014
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.12 KB | None | 0 0
  1. list_selector устанавливаю в GridView, вместо стандартного GridView
  2.  
  3.  
  4. <?xml version="1.0" encoding="utf-8"?>
  5.  
  6. <selector xmlns:android="http://schemas.android.com/apk/res/android">
  7.  
  8.     <item android:state_pressed="true">
  9.         <shape android:shape="rectangle">
  10.             <solid android:color="#f00fff"/>
  11.         </shape>
  12.     </item>
  13.  
  14.     <item android:state_focused="true">
  15.         <shape android:shape="rectangle">
  16.             <solid android:color="#000fff"/>
  17.         </shape>
  18.     </item>
  19.  
  20.     <item>
  21.         <shape android:shape="rectangle">
  22.             <solid android:color="#ff1118"/>
  23.         </shape>
  24.     </item>
  25.  
  26. </selector>
  27.  
  28.  
  29.  
  30.  
  31.  
  32. BACKGROUND LinearLayout для item.xml
  33.  
  34. <?xml version="1.0" encoding="utf-8"?>
  35.  
  36. <selector xmlns:android="http://schemas.android.com/apk/res/android">
  37. <item android:state_pressed="false">
  38.     <shape android:shape="rectangle">
  39.         <gradient android:type="linear"
  40.                   android:startColor="#626262"
  41.                   android:endColor="#515151"
  42.                   android:angle="270"/>
  43.     </shape>
  44. </item>
  45. </selector>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement