tdf#154546 skip dispatch when presenter controller is not set
[LibreOffice.git] / android / source / res / layout / activity_document_browser.xml
blob23ef44f4e5dc23ff09b810626b6f04745002fb43
1 <?xml version="1.0" encoding="utf-8"?>
2 <!--
3  This file is part of the LibreOffice project.
5  This Source Code Form is subject to the terms of the Mozilla Public
6  License, v. 2.0. If a copy of the MPL was not distributed with this
7  file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  -->
9 <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
10     xmlns:app="http://schemas.android.com/apk/res-auto"
11     xmlns:tools="http://schemas.android.com/tools"
12     android:layout_width="match_parent"
13     android:layout_height="match_parent"
14     android:orientation="vertical">
16     <!-- The toolbar -->
17     <androidx.appcompat.widget.Toolbar
18         android:id="@+id/toolbar"
19         android:layout_width="0dp"
20         android:layout_height="wrap_content"
21         android:elevation="3dp"
22         android:background="@color/toolbar_background"
23         app:theme="@style/LibreOfficeTheme.Toolbar"
24         tools:theme="@style/LibreOfficeTheme.Toolbar"
25         app:popupTheme="@style/LibreOfficeTheme"
26         tools:layout_constraintTop_creator="1"
27         tools:layout_constraintRight_creator="1"
28         app:layout_constraintRight_toRightOf="parent"
29         tools:layout_constraintLeft_creator="1"
30         app:layout_constraintLeft_toLeftOf="parent"
31         app:layout_constraintTop_toTopOf="parent">
33     </androidx.appcompat.widget.Toolbar>
36     <androidx.drawerlayout.widget.DrawerLayout
37         android:id="@+id/drawer_layout"
38         android:layout_width="0dp"
39         android:layout_height="0dp"
40         tools:layout_constraintTop_creator="1"
41         tools:layout_constraintRight_creator="1"
42         tools:layout_constraintBottom_creator="1"
43         app:layout_constraintBottom_toBottomOf="parent"
44         app:layout_constraintRight_toRightOf="parent"
45         app:layout_constraintTop_toBottomOf="@+id/toolbar"
46         tools:layout_constraintLeft_creator="1"
47         app:layout_constraintLeft_toLeftOf="parent">
49         <!-- The content -->
50         <androidx.core.widget.NestedScrollView
51             android:layout_width="match_parent"
52             android:layout_height="match_parent">
54             <LinearLayout
55                 android:layout_width="match_parent"
56                 android:layout_height="wrap_content"
57                 android:orientation="vertical"
58                 android:divider="@color/doorhanger_divider_light"
59                 android:showDividers="middle">
61                 <TextView
62                     android:id="@+id/header_browser"
63                     android:layout_width="match_parent"
64                     android:layout_height="wrap_content"
65                     android:gravity="center_vertical"
66                     android:padding="16dp"
67                     android:text="@string/title_browser"
68                     android:textSize="14sp"
69                     android:textStyle="bold" />
71                 <!--Icon and text to open system file picker via Intent -->
72                 <LinearLayout
73                     android:id="@+id/system_file_picker_layout"
74                     android:layout_width="match_parent"
75                     android:layout_height="wrap_content"
76                     android:background="?attr/colorButtonNormal"
77                     android:orientation="horizontal"
78                     app:layout_constraintTop_toBottomOf="@id/toolbar">
80                     <TextView
81                         android:id="@+id/open_file_view"
82                         android:layout_width="match_parent"
83                         android:layout_height="wrap_content"
84                         android:layout_weight="1"
85                         android:gravity="center_vertical"
86                         android:text="@string/select_file_to_open"
87                         android:textSize="14dp"
88                         app:drawableLeftCompat="@drawable/ic_folder_grey_48dp" />
89                 </LinearLayout>
91                 <TextView
92                     android:layout_width="match_parent"
93                     android:layout_height="wrap_content"
94                     android:id="@+id/header_recents"
95                     android:text="@string/title_recents"
96                     android:gravity="center_vertical"
97                     android:textSize="14sp"
98                     android:padding="16dp"
99                     android:textStyle="bold" />
101                 <!--Recent files-->
102                 <androidx.recyclerview.widget.RecyclerView
103                     android:id="@+id/list_recent"
104                     android:layout_width="match_parent"
105                     android:layout_height="wrap_content"
106                     android:layout_marginTop="8dp"
107                     android:layout_marginBottom="8dp" />
109             </LinearLayout>
111         </androidx.core.widget.NestedScrollView>
113         <!-- The navigation drawer -->
115     </androidx.drawerlayout.widget.DrawerLayout>
117     <com.google.android.material.floatingactionbutton.FloatingActionButton
118         android:id="@+id/editFAB"
119         android:layout_width="wrap_content"
120         android:layout_height="wrap_content"
121         android:clickable="true"
122         app:backgroundTint="@color/background_normal"
123         app:fabSize="normal"
124         app:layout_constraintBottom_toBottomOf="parent"
125         app:layout_constraintRight_toRightOf="parent"
126         app:srcCompat="@drawable/ic_add_black_24dp"
127         app:useCompatPadding="true" />
129     <LinearLayout
130         android:id="@+id/writerLayout"
131         android:layout_width="wrap_content"
132         android:layout_height="wrap_content"
133         android:gravity="center_vertical"
134         android:orientation="horizontal"
135         android:visibility="invisible"
136         app:layout_constraintBottom_toTopOf="@id/editFAB"
137         app:layout_constraintRight_toRightOf="@id/editFAB"
138         tools:visibility="visible">
140         <TextView
141             android:id="@+id/newWriterTextView"
142             style="@style/NewDocumentTextView"
143             android:layout_marginBottom="@dimen/new_doc_fab_tweak_bottom"
144             android:layout_marginTop="@dimen/new_doc_fab_tweak_top"
145             android:text="@string/new_textdocument" />
147         <com.google.android.material.floatingactionbutton.FloatingActionButton
148             android:id="@+id/newWriterFAB"
149             android:layout_width="wrap_content"
150             android:layout_height="wrap_content"
151             android:layout_marginBottom="@dimen/new_doc_fab_tweak_bottom"
152             android:layout_marginTop="@dimen/new_doc_fab_tweak_top"
153             android:clickable="true"
154             app:backgroundTint="@color/background_normal"
155             app:fabSize="mini"
156             app:srcCompat="@drawable/writer"
157             app:useCompatPadding="true" />
159     </LinearLayout>
161     <LinearLayout
162         android:id="@+id/impressLayout"
163         android:layout_width="wrap_content"
164         android:layout_height="wrap_content"
165         android:gravity="center_vertical"
166         android:orientation="horizontal"
167         android:visibility="invisible"
168         app:layout_constraintBottom_toTopOf="@+id/writerLayout"
169         app:layout_constraintRight_toRightOf="@id/editFAB"
170         tools:visibility="visible">
172         <TextView
173             android:id="@+id/newImpressTextView"
174             style="@style/NewDocumentTextView"
175             android:layout_marginBottom="@dimen/new_doc_fab_tweak_bottom"
176             android:layout_marginTop="@dimen/new_doc_fab_tweak_top"
177             android:text="@string/new_presentation" />
179         <com.google.android.material.floatingactionbutton.FloatingActionButton
180             android:id="@+id/newImpressFAB"
181             android:layout_width="wrap_content"
182             android:layout_height="wrap_content"
183             android:layout_marginBottom="@dimen/new_doc_fab_tweak_bottom"
184             android:layout_marginTop="@dimen/new_doc_fab_tweak_top"
185             android:clickable="true"
186             app:backgroundTint="@color/background_normal"
187             app:fabSize="mini"
188             app:srcCompat="@drawable/impress"
189             app:useCompatPadding="true" />
191     </LinearLayout>
193     <LinearLayout
194         android:id="@+id/calcLayout"
195         android:layout_width="wrap_content"
196         android:layout_height="wrap_content"
197         android:gravity="center_vertical"
198         android:orientation="horizontal"
199         android:visibility="invisible"
200         tools:visibility="visible"
201         app:layout_constraintBottom_toTopOf="@+id/impressLayout"
202         app:layout_constraintRight_toRightOf="@id/editFAB">
204         <TextView
205             android:id="@+id/newCalcTextView"
206             style="@style/NewDocumentTextView"
207             android:layout_marginBottom="@dimen/new_doc_fab_tweak_bottom"
208             android:layout_marginTop="@dimen/new_doc_fab_tweak_top"
209             android:text="@string/new_spreadsheet" />
211         <com.google.android.material.floatingactionbutton.FloatingActionButton
212             android:id="@+id/newCalcFAB"
213             android:layout_width="wrap_content"
214             android:layout_height="wrap_content"
215             android:layout_marginBottom="@dimen/new_doc_fab_tweak_bottom"
216             android:layout_marginTop="@dimen/new_doc_fab_tweak_top"
217             android:clickable="true"
218             app:backgroundTint="@color/background_normal"
219             app:fabSize="mini"
220             app:srcCompat="@drawable/calc"
221             app:useCompatPadding="true" />
223     </LinearLayout>
225     <LinearLayout
226         android:id="@+id/drawLayout"
227         android:layout_width="wrap_content"
228         android:layout_height="wrap_content"
229         android:gravity="center_vertical"
230         android:orientation="horizontal"
231         android:visibility="invisible"
232         tools:visibility="visible"
233         app:layout_constraintBottom_toTopOf="@+id/calcLayout"
234         app:layout_constraintRight_toRightOf="@id/editFAB">
236         <TextView
237             android:id="@+id/newDrawTextView"
238             style="@style/NewDocumentTextView"
239             android:layout_marginBottom="@dimen/new_doc_fab_tweak_bottom"
240             android:layout_marginTop="@dimen/new_doc_fab_tweak_top"
241             android:text="@string/new_drawing" />
243         <com.google.android.material.floatingactionbutton.FloatingActionButton
244             android:id="@+id/newDrawFAB"
245             android:layout_width="wrap_content"
246             android:layout_height="wrap_content"
247             android:layout_marginBottom="@dimen/new_doc_fab_tweak_bottom"
248             android:layout_marginTop="@dimen/new_doc_fab_tweak_top"
249             android:clickable="true"
250             app:backgroundTint="@color/background_normal"
251             app:fabSize="mini"
252             app:srcCompat="@drawable/draw"
253             app:useCompatPadding="true" />
255     </LinearLayout>
257 </androidx.constraintlayout.widget.ConstraintLayout>