item_chapter.xml 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:tools="http://schemas.android.com/tools"
  4. android:layout_width="fill_parent"
  5. android:layout_height="?android:attr/listPreferredItemHeight"
  6. android:padding="6dip"
  7. android:background="@drawable/selector_chapter_light">
  8. <RelativeLayout
  9. android:layout_width="fill_parent"
  10. android:layout_height="18dp"
  11. android:id="@+id/relativeLayout"
  12. android:layout_alignParentBottom="true"
  13. android:layout_alignParentLeft="true"
  14. android:layout_alignParentStart="true">
  15. <TextView
  16. android:id="@+id/chapter_pages"
  17. android:layout_width="wrap_content"
  18. android:layout_height="fill_parent"
  19. android:ellipsize="marquee"
  20. android:singleLine="true"
  21. android:textSize="12sp"
  22. tools:text="Pages: 45"
  23. android:layout_alignParentTop="true"
  24. android:layout_centerHorizontal="true"/>
  25. <TextView
  26. android:id="@+id/chapter_date"
  27. android:layout_width="wrap_content"
  28. android:layout_height="fill_parent"
  29. android:ellipsize="marquee"
  30. android:singleLine="true"
  31. android:textSize="12sp"
  32. tools:text="22/02/2016"/>
  33. <TextView
  34. android:id="@+id/download_text"
  35. android:layout_width="wrap_content"
  36. android:layout_height="fill_parent"
  37. android:textSize="12sp"
  38. android:textColor="@color/accent_text"
  39. android:text="@string/chapter_downloaded"
  40. android:layout_centerVertical="true"
  41. android:layout_alignParentRight="true"
  42. android:layout_alignParentEnd="true"/>
  43. </RelativeLayout>
  44. <TextView
  45. android:id="@+id/chapter_title"
  46. android:layout_width="fill_parent"
  47. android:layout_height="wrap_content"
  48. android:layout_alignWithParentIfMissing="true"
  49. android:gravity="center_vertical"
  50. android:textSize="20sp"
  51. android:ellipsize="end"
  52. android:maxLines="1"
  53. tools:text="Title"
  54. android:layout_alignParentTop="true"
  55. android:layout_alignParentLeft="true"
  56. android:layout_alignParentStart="true"
  57. android:layout_toStartOf="@+id/relativeLayout2"
  58. android:layout_toLeftOf="@+id/relativeLayout2"/>
  59. <RelativeLayout
  60. android:layout_width="30dp"
  61. android:layout_height="30dp"
  62. android:layout_alignParentTop="true"
  63. android:layout_alignParentRight="true"
  64. android:layout_alignParentEnd="true"
  65. android:layout_gravity="center_vertical"
  66. android:gravity="center"
  67. android:id="@+id/relativeLayout2"
  68. android:layout_above="@+id/relativeLayout">
  69. <ImageView
  70. android:id="@+id/chapter_menu"
  71. android:layout_width="fill_parent"
  72. android:layout_height="fill_parent"
  73. android:scaleType="fitXY"
  74. android:src="@drawable/ic_more_horiz_black_36dp"
  75. android:background="?android:selectableItemBackground"/>
  76. </RelativeLayout>
  77. </RelativeLayout>