list_item.xml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. ownCloud Android client application
  4. Copyright (C) 2012 Bartek Przybylski
  5. Copyright (C) 2015 ownCloud Inc.
  6. This program is free software: you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License version 2,
  8. as published by the Free Software Foundation.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. -->
  16. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  17. android:id="@+id/ListItemLayout"
  18. android:layout_width="match_parent"
  19. android:background="@drawable/list_selector"
  20. android:orientation="vertical"
  21. android:layout_height="@dimen/standard_list_item_size">
  22. <LinearLayout
  23. android:layout_width="match_parent"
  24. android:layout_height="match_parent"
  25. android:orientation="horizontal">
  26. <FrameLayout
  27. android:layout_width="60dp"
  28. android:layout_height="@dimen/standard_list_item_size"
  29. android:paddingLeft="12dp"
  30. android:paddingBottom="@dimen/standard_padding"
  31. android:paddingTop="@dimen/standard_padding"
  32. android:paddingRight="4dp"
  33. android:focusable="false"
  34. android:focusableInTouchMode="false">
  35. <ImageView
  36. android:id="@+id/localFileIndicator"
  37. android:layout_width="@dimen/file_icon_size"
  38. android:layout_height="@dimen/file_icon_size"
  39. android:layout_gravity="top|right"
  40. android:layout_marginRight="4dp"
  41. android:src="@drawable/ic_synced" />
  42. <ImageView
  43. android:id="@+id/thumbnail"
  44. android:layout_width="@dimen/file_icon_size"
  45. android:layout_height="@dimen/file_icon_size"
  46. android:layout_gravity="left|center_vertical"
  47. android:src="@drawable/ic_menu_archive" />
  48. <ImageView
  49. android:id="@+id/favoriteIcon"
  50. android:layout_width="wrap_content"
  51. android:layout_height="wrap_content"
  52. android:layout_gravity="bottom|right"
  53. android:layout_marginRight="4dp"
  54. android:src="@drawable/ic_available_offline" />
  55. </FrameLayout>
  56. <LinearLayout
  57. android:layout_width="0dp"
  58. android:layout_height="match_parent"
  59. android:layout_weight="1"
  60. android:gravity="top"
  61. android:paddingTop="@dimen/standard_padding"
  62. android:orientation="vertical" >
  63. <TextView
  64. android:id="@+id/Filename"
  65. android:layout_width="wrap_content"
  66. android:layout_height="wrap_content"
  67. android:layout_gravity="center_vertical"
  68. android:layout_marginLeft="0dp"
  69. android:layout_marginRight="4dp"
  70. android:ellipsize="middle"
  71. android:singleLine="true"
  72. android:text="TextView"
  73. android:textColor="@color/textColor"
  74. android:textSize="@dimen/two_line_primary_text_size" />
  75. <LinearLayout
  76. android:layout_width="match_parent"
  77. android:layout_height="wrap_content"
  78. android:layout_marginLeft="0dp"
  79. android:layout_marginRight="4dp"
  80. android:orientation="horizontal">
  81. <TextView
  82. android:id="@+id/file_size"
  83. android:layout_width="wrap_content"
  84. android:layout_height="wrap_content"
  85. android:text="Size MB"
  86. android:textColor="@color/list_item_lastmod_and_filesize_text"
  87. android:textSize="@dimen/two_line_secondary_text_size"/>
  88. <TextView
  89. android:id="@+id/file_separator"
  90. android:layout_width="wrap_content"
  91. android:layout_height="wrap_content"
  92. android:gravity="right"
  93. android:text=", "
  94. android:textColor="@color/list_item_lastmod_and_filesize_text"
  95. android:textSize="@dimen/two_line_secondary_text_size"/>
  96. <TextView
  97. android:id="@+id/last_mod"
  98. android:layout_width="wrap_content"
  99. android:layout_height="wrap_content"
  100. android:gravity="right"
  101. android:text="Mod Date"
  102. android:textColor="@color/list_item_lastmod_and_filesize_text"
  103. android:textSize="@dimen/two_line_secondary_text_size"/>
  104. </LinearLayout>
  105. </LinearLayout>
  106. <ImageView
  107. android:id="@+id/sharedIcon"
  108. android:layout_width="wrap_content"
  109. android:layout_height="wrap_content"
  110. android:layout_gravity="center"
  111. android:layout_marginTop="4dp"
  112. android:layout_marginLeft="4dp"
  113. android:layout_marginBottom="4dp"
  114. android:layout_marginRight="4dp"
  115. android:src="@drawable/shared_via_link" />
  116. <ImageView
  117. android:id="@+id/custom_checkbox"
  118. android:layout_width="wrap_content"
  119. android:layout_height="wrap_content"
  120. android:layout_gravity="center_vertical"
  121. android:layout_marginLeft="4dp"
  122. android:layout_marginRight="@dimen/standard_margin"
  123. android:gravity=""
  124. android:src="@drawable/ic_checkbox_blank_outline" />
  125. </LinearLayout>
  126. <View
  127. android:layout_width="match_parent"
  128. android:layout_height="1dp"
  129. android:background="@color/list_divider_background"></View>
  130. </LinearLayout>