upload_list_item.xml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Nextcloud Android client application
  4. Copyright (C) 2018 Tobias Kaminsky
  5. Copyright (C) 2018 Nextcloud
  6. This program is free software; you can redistribute it and/or
  7. modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
  8. License as published by the Free Software Foundation; either
  9. version 3 of the License, or any later version.
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU AFFERO GENERAL PUBLIC LICENSE for more details.
  14. You should have received a copy of the GNU Affero General Public
  15. License along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. -->
  17. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  18. android:id="@+id/upload_list_item_layout"
  19. android:layout_width="match_parent"
  20. android:layout_height="wrap_content"
  21. android:baselineAligned="false"
  22. android:orientation="horizontal"
  23. android:paddingBottom="@dimen/standard_half_padding"
  24. android:paddingTop="@dimen/standard_half_padding">
  25. <FrameLayout
  26. android:layout_width="@dimen/upload_list_item_frame_layout_width"
  27. android:layout_height="@dimen/standard_list_item_size"
  28. android:focusable="false"
  29. android:focusableInTouchMode="false">
  30. <ImageView
  31. android:id="@+id/thumbnail"
  32. android:layout_width="@dimen/file_icon_size"
  33. android:layout_height="@dimen/file_icon_size"
  34. android:layout_gravity="center"
  35. android:contentDescription="@null"
  36. android:src="@drawable/folder" />
  37. </FrameLayout>
  38. <LinearLayout
  39. android:layout_width="0dp"
  40. android:layout_height="wrap_content"
  41. android:layout_gravity="center_vertical"
  42. android:layout_weight="1"
  43. android:gravity="center_vertical"
  44. android:orientation="vertical">
  45. <TextView
  46. android:id="@+id/upload_name"
  47. android:layout_width="wrap_content"
  48. android:layout_height="wrap_content"
  49. android:layout_gravity="center_vertical"
  50. android:ellipsize="middle"
  51. android:singleLine="true"
  52. android:text="@string/placeholder_filename"
  53. android:textColor="@color/text_color"
  54. android:textSize="@dimen/two_line_primary_text_size" />
  55. <LinearLayout
  56. android:layout_width="match_parent"
  57. android:layout_height="wrap_content">
  58. <TextView
  59. android:id="@+id/upload_file_size"
  60. android:layout_width="wrap_content"
  61. android:layout_height="wrap_content"
  62. android:ellipsize="middle"
  63. android:gravity="start"
  64. android:singleLine="true"
  65. android:text="@string/placeholder_fileSize"
  66. android:textColor="@color/list_item_lastmod_and_filesize_text"
  67. android:textSize="@dimen/upload_list_item_text_size" />
  68. <TextView
  69. android:id="@+id/upload_date"
  70. android:layout_width="wrap_content"
  71. android:layout_height="wrap_content"
  72. android:layout_marginEnd="@dimen/standard_quarter_margin"
  73. android:layout_marginStart="@dimen/standard_quarter_margin"
  74. android:text="@string/placeholder_timestamp"
  75. android:textColor="@color/list_item_lastmod_and_filesize_text"
  76. android:textSize="@dimen/upload_list_item_text_size" />
  77. <TextView
  78. android:id="@+id/upload_status"
  79. android:layout_width="wrap_content"
  80. android:layout_height="wrap_content"
  81. android:text="@string/uploads_view_upload_status_succeeded"
  82. android:textColor="@color/list_item_lastmod_and_filesize_text"
  83. android:textSize="@dimen/upload_list_item_text_size" />
  84. </LinearLayout>
  85. <ProgressBar
  86. android:id="@+id/upload_progress_bar"
  87. style="?android:attr/progressBarStyleHorizontal"
  88. android:layout_width="match_parent"
  89. android:layout_height="wrap_content"
  90. android:visibility="gone" />
  91. <TextView
  92. android:id="@+id/upload_account"
  93. android:layout_width="wrap_content"
  94. android:layout_height="wrap_content"
  95. android:maxLines="1"
  96. android:text="@string/auth_username"
  97. android:textColor="@color/list_item_lastmod_and_filesize_text"
  98. android:textSize="@dimen/upload_list_item_text_size" />
  99. <TextView
  100. android:id="@+id/upload_remote_path"
  101. android:layout_width="wrap_content"
  102. android:layout_height="wrap_content"
  103. android:ellipsize="middle"
  104. android:singleLine="true"
  105. android:text="@string/instant_upload_path"
  106. android:textColor="@color/list_item_lastmod_and_filesize_text"
  107. android:textSize="@dimen/upload_list_item_text_size" />
  108. </LinearLayout>
  109. <FrameLayout
  110. android:layout_width="@dimen/min_list_item_size"
  111. android:layout_height="@dimen/standard_list_item_size"
  112. android:layout_gravity="center_vertical"
  113. android:focusable="false"
  114. android:focusableInTouchMode="false"
  115. android:paddingEnd="@dimen/zero"
  116. android:paddingLeft="@dimen/standard_half_padding"
  117. android:paddingRight="@dimen/zero"
  118. android:paddingStart="@dimen/standard_half_padding">
  119. <ImageButton
  120. android:id="@+id/upload_right_button"
  121. android:layout_width="@dimen/upload_list_item_image_size"
  122. android:layout_height="@dimen/upload_list_item_image_size"
  123. android:layout_gravity="center|end"
  124. android:background="@android:color/transparent"
  125. android:contentDescription="@string/upload_item_action_button" />
  126. </FrameLayout>
  127. </LinearLayout>