summaryrefslogtreecommitdiff
path: root/android/app/src/main/res/layout/activity_document_browser.xml
blob: 4ab69a188cb59b3a3d154b244bcd72770155a6ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
<?xml version="1.0" encoding="utf-8"?>
<!--
 This file is part of the LibreOffice project.

 This Source Code Form is subject to the terms of the Mozilla Public
 License, v. 2.0. If a copy of the MPL was not distributed with this
 file, You can obtain one at http://mozilla.org/MPL/2.0/.
 -->

<androidx.drawerlayout.widget.DrawerLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:clickable="true"
    android:focusableInTouchMode="true"
    android:focusable="true">

    <!-- The content -->

    <androidx.coordinatorlayout.widget.CoordinatorLayout
        android:id="@+id/overview_coordinator_layout"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <com.google.android.material.appbar.AppBarLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <androidx.appcompat.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@color/toolbar_background"
                android:elevation="3dp"
                app:theme="@style/LibreOfficeTheme.Toolbar"
                app:popupTheme="@style/LibreOfficeTheme"
                app:layout_scrollFlags="enterAlways|scroll" />

        </com.google.android.material.appbar.AppBarLayout>

        <androidx.core.widget.NestedScrollView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:layout_behavior="@string/appbar_scrolling_view_behavior">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:orientation="vertical">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal">

                    <TextView
                        android:id="@+id/header_recents"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:gravity="center_vertical"
                        android:padding="16dp"
                        android:text="@string/title_recents"
                        android:textSize="14sp"
                        android:textStyle="bold" />

                    <ImageView
                        android:id="@+id/recent_list_or_grid"
                        android:layout_width="96dp"
                        android:layout_height="match_parent"
                        android:layout_weight="1"
                        android:scaleType="centerInside"
                        app:srcCompat="@drawable/ic_list_black_24dp" />
                </LinearLayout>

                <FrameLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">

                    <androidx.recyclerview.widget.RecyclerView
                        android:id="@+id/list_recent"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="8dp"
                        android:layout_marginBottom="8dp" >

                    </androidx.recyclerview.widget.RecyclerView>

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:layout_marginTop="16dp"
                        android:orientation="horizontal">

                        <Space
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_weight="3" />

                        <TextView
                            android:id="@+id/no_recent_items_msg"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_weight="2"
                            android:text="@string/no_recent_items"
                            android:textAlignment="center"
                            android:textSize="14sp" />

                        <Space
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_weight="3" />
                    </LinearLayout>

                </FrameLayout>

            </LinearLayout>

        </androidx.core.widget.NestedScrollView>

        <!-- Floating Action Buttons -->

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_weight="1">

            <com.google.android.material.floatingactionbutton.FloatingActionButton
                android:id="@+id/editFAB"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:clickable="true"
                android:focusable="true"
                app:backgroundTint="@color/background_normal"
                app:fabSize="normal"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintRight_toRightOf="parent"
                app:srcCompat="@drawable/ic_add_black_24dp"
                app:useCompatPadding="true" />

            <LinearLayout
                android:id="@+id/writerLayout"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center_vertical"
                android:orientation="horizontal"
                android:visibility="invisible"
                app:layout_constraintBottom_toTopOf="@id/editFAB"
                app:layout_constraintRight_toRightOf="@id/editFAB"
                tools:visibility="visible">

                <TextView
                    android:id="@+id/newWriterTextView"
                    style="@style/NewDocumentTextView"
                    android:layout_marginTop="@dimen/new_doc_fab_tweak_top"
                    android:layout_marginBottom="@dimen/new_doc_fab_tweak_bottom"
                    android:text="@string/new_textdocument" />

                <com.google.android.material.floatingactionbutton.FloatingActionButton
                    android:id="@+id/newWriterFAB"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/new_doc_fab_tweak_top"
                    android:layout_marginBottom="@dimen/new_doc_fab_tweak_bottom"
                    android:clickable="true"
                    android:focusable="true"
                    app:backgroundTint="@color/background_normal"
                    app:fabSize="mini"
                    app:srcCompat="@drawable/writer"
                    app:useCompatPadding="true" />

            </LinearLayout>

            <LinearLayout
                android:id="@+id/impressLayout"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center_vertical"
                android:orientation="horizontal"
                android:visibility="invisible"
                app:layout_constraintBottom_toTopOf="@+id/writerLayout"
                app:layout_constraintRight_toRightOf="@id/editFAB"
                tools:visibility="visible">

                <TextView
                    android:id="@+id/newImpressTextView"
                    style="@style/NewDocumentTextView"
                    android:layout_marginTop="@dimen/new_doc_fab_tweak_top"
                    android:layout_marginBottom="@dimen/new_doc_fab_tweak_bottom"
                    android:text="@string/new_presentation" />

                <com.google.android.material.floatingactionbutton.FloatingActionButton
                    android:id="@+id/newImpressFAB"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/new_doc_fab_tweak_top"
                    android:layout_marginBottom="@dimen/new_doc_fab_tweak_bottom"
                    android:clickable="true"
                    android:focusable="true"
                    app:backgroundTint="@color/background_normal"
                    app:fabSize="mini"
                    app:srcCompat="@drawable/impress"
                    app:useCompatPadding="true" />

            </LinearLayout>

            <LinearLayout
                android:id="@+id/calcLayout"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center_vertical"
                android:orientation="horizontal"
                android:visibility="invisible"
                app:layout_constraintBottom_toTopOf="@+id/impressLayout"
                app:layout_constraintRight_toRightOf="@id/editFAB"
                tools:visibility="visible">

                <TextView
                    android:id="@+id/newCalcTextView"
                    style="@style/NewDocumentTextView"
                    android:layout_marginTop="@dimen/new_doc_fab_tweak_top"
                    android:layout_marginBottom="@dimen/new_doc_fab_tweak_bottom"
                    android:text="@string/new_spreadsheet" />

                <com.google.android.material.floatingactionbutton.FloatingActionButton
                    android:id="@+id/newCalcFAB"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/new_doc_fab_tweak_top"
                    android:layout_marginBottom="@dimen/new_doc_fab_tweak_bottom"
                    android:clickable="true"
                    android:focusable="true"
                    app:backgroundTint="@color/background_normal"
                    app:fabSize="mini"
                    app:srcCompat="@drawable/calc"
                    app:useCompatPadding="true" />

            </LinearLayout>

        </androidx.constraintlayout.widget.ConstraintLayout>

    </androidx.coordinatorlayout.widget.CoordinatorLayout>

    <!-- The navigation drawer -->

    <com.google.android.material.navigation.NavigationView
        android:id="@+id/navigation_drawer"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:background="@color/background_normal"
        android:theme="@style/LibreOfficeTheme.NavigationView"
        app:headerLayout="@layout/navigation_header"
        app:menu="@menu/navigation_menu" />

</androidx.drawerlayout.widget.DrawerLayout>