Advertisement
Guest User

Untitled

a guest
Jul 3rd, 2015
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.12 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <ListView xmlns:android="http://schemas.android.com/apk/res/android"
  3. android:id="@android:id/list"
  4. android:layout_width="match_parent"
  5. android:layout_height="match_parent"
  6. android:paddingTop="@dimen/menu_padding"
  7. android:background="@color/customBlue"
  8. android:divider="@drawable/list_divider"
  9. android:dividerHeight="2px" />
  10.  
  11. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  12. xmlns:tools="http://schemas.android.com/tools"
  13. android:layout_width="match_parent"
  14. android:layout_height="50dp"
  15. android:orientation="horizontal"
  16. tools:ignore="contentDescription"
  17. android:background="@color/strongBlue" >
  18.  
  19. <ImageView
  20. android:id="@+id/row_icon"
  21. android:layout_width="50dp"
  22. android:layout_height="50dp"
  23. android:padding="10dp"
  24. android:src="@drawable/ic_launcher" />
  25.  
  26. <TextView
  27. android:id="@+id/row_title"
  28. android:layout_width="0dp"
  29. android:layout_height="match_parent"
  30. android:layout_weight="1"
  31. android:gravity="center_vertical"
  32. android:padding="10dp"
  33. android:textColor="@color/white"
  34. android:textAppearance="@android:style/TextAppearance.Medium" />
  35. </LinearLayout>
  36.  
  37. <?xml version="1.0" encoding="utf-8"?>
  38. <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
  39. <item android:bottom="1px">
  40. <shape android:shape="line">
  41. <stroke
  42. android:color="#0C0832"
  43. android:width="2dp"
  44. />
  45. <size
  46. android:height="1px"
  47. />
  48. </shape>
  49. </item>
  50. <item android:top="1px">
  51. <shape android:shape="line">
  52. <stroke
  53. android:color="#2D2E57"
  54. android:width="2dp"
  55. />
  56. <size
  57. android:height="1px"
  58. />
  59. </shape>
  60. </item>
  61. </layer-list>
  62.  
  63. Instead of pixel you can provide dp
  64.  
  65. android:dividerHeight="10dp"
  66. android:divider="#ffffff"
  67.  
  68. Instead of making custom drawable for divider you can directly give color to divider.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement