synced_folders_layout.xml 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. Nextcloud Android client application
  4. Copyright (C) 2017 Andy Scherzinger
  5. Copyright (C) 2017 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. <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
  18. xmlns:app="http://schemas.android.com/apk/res-auto"
  19. xmlns:tools="http://schemas.android.com/tools"
  20. android:id="@+id/drawer_layout"
  21. android:layout_width="match_parent"
  22. android:layout_height="match_parent"
  23. android:fitsSystemWindows="true"
  24. tools:openDrawer="start">
  25. <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
  26. xmlns:app="http://schemas.android.com/apk/res-auto"
  27. xmlns:tools="http://schemas.android.com/tools"
  28. android:layout_width="match_parent"
  29. android:layout_height="match_parent">
  30. <android.support.design.widget.AppBarLayout
  31. android:id="@+id/app_bar"
  32. android:layout_width="match_parent"
  33. android:layout_height="wrap_content">
  34. <android.support.design.widget.CollapsingToolbarLayout
  35. android:id="@+id/collapsing_toolbar"
  36. android:layout_width="match_parent"
  37. android:layout_height="@dimen/collapsing_toolbar_layout_height"
  38. app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"
  39. app:titleEnabled="false">
  40. <RelativeLayout
  41. android:id="@+id/custom_folder_toolbar"
  42. android:layout_width="match_parent"
  43. android:layout_height="wrap_content"
  44. android:layout_gravity="center_horizontal|bottom"
  45. android:gravity="center"
  46. android:onClick="onAddCustomFolderClick"
  47. android:padding="@dimen/standard_padding"
  48. app:layout_collapseMode="pin">
  49. <ImageView
  50. android:id="@+id/custom_folder_image"
  51. android:layout_width="wrap_content"
  52. android:layout_height="wrap_content"
  53. android:src="@drawable/ic_folder_star_18dp"
  54. android:contentDescription="@string/synced_folder_custom_folder_image"/>
  55. <TextView
  56. android:id="@+id/add_custom_folder"
  57. android:layout_width="wrap_content"
  58. android:layout_height="wrap_content"
  59. android:layout_toRightOf="@id/custom_folder_image"
  60. android:layout_toEndOf="@id/custom_folder_image"
  61. android:paddingLeft="@dimen/alternate_half_padding"
  62. android:paddingStart="@dimen/alternate_half_padding"
  63. android:paddingRight="@dimen/zero"
  64. android:paddingEnd="@dimen/zero"
  65. android:text="@string/autoupload_custom_folder"/>
  66. </RelativeLayout>
  67. <android.support.v7.widget.Toolbar
  68. android:id="@+id/toolbar"
  69. android:layout_width="match_parent"
  70. android:layout_height="?attr/actionBarSize"
  71. android:background="?attr/colorPrimary"
  72. app:layout_collapseMode="pin"/>
  73. </android.support.design.widget.CollapsingToolbarLayout>
  74. </android.support.design.widget.AppBarLayout>
  75. <FrameLayout
  76. android:id="@+id/ListLayout"
  77. android:layout_width="match_parent"
  78. android:layout_height="match_parent"
  79. android:layout_above="@+id/bottom_navigation_view"
  80. android:orientation="vertical"
  81. app:layout_behavior="@string/appbar_scrolling_view_behavior">
  82. <LinearLayout
  83. android:id="@android:id/progress"
  84. android:layout_width="match_parent"
  85. android:layout_height="wrap_content"
  86. android:layout_gravity="center"
  87. android:orientation="vertical"
  88. android:visibility="gone">
  89. <ProgressBar
  90. android:id="@+id/syncedFoldersProgressBar"
  91. android:layout_width="@dimen/synced_folders_progress_bar_layout_width"
  92. android:layout_height="@dimen/synced_folders_progress_bar_layout_height"
  93. android:layout_gravity="center_horizontal"/>
  94. <TextView
  95. android:id="@+id/progressText"
  96. android:layout_width="wrap_content"
  97. android:layout_height="wrap_content"
  98. android:layout_gravity="center_horizontal"
  99. android:layout_margin="@dimen/standard_half_margin"
  100. android:text="@string/synced_folders_loading_folders"
  101. android:textSize="26sp"/>
  102. </LinearLayout>
  103. <TextView
  104. android:id="@android:id/empty"
  105. android:layout_width="wrap_content"
  106. android:layout_height="wrap_content"
  107. android:layout_gravity="center"
  108. android:layout_margin="@dimen/standard_margin"
  109. android:gravity="center"
  110. android:text="@string/synced_folders_no_results"
  111. android:visibility="gone"/>
  112. <android.support.v7.widget.RecyclerView
  113. android:id="@android:id/list"
  114. android:layout_width="match_parent"
  115. android:layout_height="match_parent"
  116. android:layout_marginBottom="@dimen/synced_folders_recycler_view_layout_margin"
  117. android:layout_marginLeft="@dimen/synced_folders_recycler_view_layout_margin"
  118. android:layout_marginRight="@dimen/synced_folders_recycler_view_layout_margin"
  119. android:clipToPadding="false"
  120. android:scrollbarStyle="outsideOverlay"
  121. android:scrollbars="vertical"
  122. android:visibility="visible"/>
  123. </FrameLayout>
  124. <android.support.design.widget.BottomNavigationView
  125. android:id="@+id/bottom_navigation_view"
  126. android:layout_width="match_parent"
  127. android:layout_height="wrap_content"
  128. android:layout_alignParentBottom="true"
  129. android:visibility="gone"
  130. app:itemBackground="@color/primary_button_background_color"
  131. app:itemIconTint="@color/primary_button_text_color"
  132. app:itemTextColor="@color/primary_button_text_color"
  133. app:menu="@menu/navigation_bar_menu"/>
  134. </android.support.design.widget.CoordinatorLayout>
  135. <include
  136. layout="@layout/drawer"
  137. android:layout_width="@dimen/drawer_width"
  138. android:layout_height="match_parent"
  139. android:layout_gravity="start"/>
  140. </android.support.v4.widget.DrawerLayout>