[Libreoffice-commits] online.git: 5 commits - android/app android/lib loleaflet/Makefile.am

Jan Holesovsky (via logerrit) logerrit at kemper.freedesktop.org
Fri Feb 21 12:56:26 UTC 2020


 android/app/.gitignore                                                             |    1 
 android/app/src/main/AndroidManifest.xml                                           |   14 
 android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java |  418 ++++------
 android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java    |   20 
 android/app/src/main/res/drawable/drawer_header.png                                |binary
 android/app/src/main/res/layout/activity_directory_browser.xml                     |    6 
 android/app/src/main/res/layout/activity_document_browser.xml                      |  399 +++++----
 android/app/src/main/res/layout/file_list_item.xml                                 |   17 
 android/app/src/main/res/layout/navigation_header.xml                              |   14 
 android/app/src/main/res/menu/navigation_menu.xml                                  |   87 +-
 android/app/src/main/res/menu/view_menu.xml                                        |   55 -
 android/app/src/main/res/values/strings.xml                                        |    2 
 android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java               |   54 -
 android/lib/src/main/res/layout/lolib_activity_main.xml                            |   21 
 loleaflet/Makefile.am                                                              |    1 
 15 files changed, 534 insertions(+), 575 deletions(-)

New commits:
commit bc53677f188d82a80f7bf7be5d400d19697f015c
Author:     Jan Holesovsky <kendy at collabora.com>
AuthorDate: Fri Feb 21 13:39:38 2020 +0100
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Fri Feb 21 13:51:54 2020 +0100

    android: Show the 'assets' progressbar only when we are going to copy.
    
    And use for that the dialog that we already have for Saving... or
    Loading... the presentation.
    
    Change-Id: I005b81514f778d13a0ab485ccdf85845f87edc6e

diff --git a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
index 9b6c5d168..8fe8636c7 100644
--- a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
+++ b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
@@ -245,15 +245,6 @@ public class LOActivity extends AppCompatActivity {
         return true;
     }
 
-    private void updatePreferences() {
-        if (!sPrefs.getString(ASSETS_EXTRACTED_GIT_COMMIT, "").equals(BuildConfig.GIT_COMMIT)) {
-            if (copyFromAssets(getAssets(), "unpack", getApplicationInfo().dataDir) &&
-                    copyFonts("/system/fonts", getApplicationInfo().dataDir + "/user/fonts")) {
-                sPrefs.edit().putString(ASSETS_EXTRACTED_GIT_COMMIT, BuildConfig.GIT_COMMIT).apply();
-            }
-        }
-    }
-
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
@@ -264,26 +255,37 @@ public class LOActivity extends AppCompatActivity {
         init();
     }
 
+    /** Initialize the app - copy the assets and create the UI. */
     private void init() {
+        if (sPrefs.getString(ASSETS_EXTRACTED_GIT_COMMIT, "").equals(BuildConfig.GIT_COMMIT)) {
+            // all is fine, we have already copied the assets
+            initUI();
+            return;
+        }
+
+        final AlertDialog assetsProgress = createProgressDialog(R.string.preparing_for_the_first_start_after_an_update);
+        assetsProgress.show();
+
         new AsyncTask<Void, Void, Void>() {
             @Override
             protected Void doInBackground(Void... voids) {
-                updatePreferences();
+                // copy the new assets
+                if (copyFromAssets(getAssets(), "unpack", getApplicationInfo().dataDir) && copyFonts("/system/fonts", getApplicationInfo().dataDir + "/user/fonts")) {
+                    sPrefs.edit().putString(ASSETS_EXTRACTED_GIT_COMMIT, BuildConfig.GIT_COMMIT).apply();
+                }
                 return null;
             }
 
             @Override
             protected void onPostExecute(Void aVoid) {
+                assetsProgress.dismiss();
                 initUI();
             }
         }.execute();
     }
 
+    /** Actual initialization of the UI. */
     private void initUI() {
-        TextView assetsTextView = findViewById(R.id.assetsTextView);
-        ProgressBar assetsProgressbar = findViewById(R.id.assetsProgressbar);
-        assetsProgressbar.setVisibility(View.GONE);
-        assetsTextView.setVisibility(View.GONE);
         isDocDebuggable = sPrefs.getBoolean(KEY_ENABLE_SHOW_DEBUG_INFO, false) && BuildConfig.DEBUG;
 
         if (getIntent().getData() != null) {
@@ -501,10 +503,6 @@ public class LOActivity extends AppCompatActivity {
     protected void onResume() {
         super.onResume();
         Log.i(TAG, "onResume..");
-
-        // check for config change
-        if (documentLoaded)
-            updatePreferences();
     }
 
     @Override
@@ -603,17 +601,23 @@ public class LOActivity extends AppCompatActivity {
         return null;
     }
 
-    /** Show the Saving progress and finish the app. */
-    private void finishWithProgress() {
+    /** Create the progress dialog. */
+    private AlertDialog createProgressDialog(int id) {
         LayoutInflater inflater = this.getLayoutInflater();
+
         View loadingView = inflater.inflate(R.layout.lolib_dialog_loading, null);
         TextView loadingText = loadingView.findViewById(R.id.lolib_loading_dialog_text);
-        loadingText.setText(getText(R.string.saving));
-        final AlertDialog savingProgress = new AlertDialog.Builder(LOActivity.this)
+        loadingText.setText(getText(id));
+
+        return new AlertDialog.Builder(LOActivity.this)
             .setView(loadingView)
             .setCancelable(true)
             .create();
+    }
 
+    /** Show the Saving progress and finish the app. */
+    private void finishWithProgress() {
+        final AlertDialog savingProgress = createProgressDialog(R.string.saving);
         savingProgress.show();
 
         // The 'BYE' takes a considerable amount of time, we need to post it
@@ -904,11 +908,7 @@ public class LOActivity extends AppCompatActivity {
     }
 
     private void initiateSlideShow() {
-        final AlertDialog slideShowProgress = new AlertDialog.Builder(this)
-                .setCancelable(false)
-                .setView(R.layout.lolib_dialog_loading)
-                .create();
-
+        final AlertDialog slideShowProgress = createProgressDialog(R.string.loading);
         slideShowProgress.show();
 
         nativeHandler.post(new Runnable() {
diff --git a/android/lib/src/main/res/layout/lolib_activity_main.xml b/android/lib/src/main/res/layout/lolib_activity_main.xml
index 9d9524dc5..8d1f1d9ff 100644
--- a/android/lib/src/main/res/layout/lolib_activity_main.xml
+++ b/android/lib/src/main/res/layout/lolib_activity_main.xml
@@ -11,25 +11,6 @@
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         tools:layout_editor_absoluteX="0dp"
-        tools:layout_editor_absoluteY="-6dp" />
-
-    <ProgressBar
-        android:id="@+id/assetsProgressbar"
-        style="?android:attr/progressBarStyle"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent" />
-
-    <TextView
-        android:id="@+id/assetsTextView"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:text="@string/preparing_for_the_first_start_after_an_update"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/assetsProgressbar" />
+        tools:layout_editor_absoluteY="0dp" />
 
 </androidx.constraintlayout.widget.ConstraintLayout>
commit 328f12effd4c35fe16810454cd86d4338ab59c42
Author:     Jan Holesovsky <kendy at collabora.com>
AuthorDate: Fri Feb 21 11:55:09 2020 +0100
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Fri Feb 21 13:51:40 2020 +0100

    android shell: Clean up the file list view of the recent files.
    
    Change-Id: If882adf0e7fedcdf003fcd3a1690d5d765ccf3aa

diff --git a/android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java b/android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java
index fc05d38b3..7c098af80 100644
--- a/android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java
+++ b/android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java
@@ -59,7 +59,8 @@ class RecentFilesAdapter extends RecyclerView.Adapter<RecentFilesAdapter.ViewHol
 
         String filename = "";
         long length = 0;
-        Date date = null; // TODO get it at least for files
+        // TODO Date not avaiable now
+        //Date date = null;
 
         // Try to get it from the content resolver first, fallback to path
         Cursor cursor = mActivity.getContentResolver().query(uri, null, null, null, null);
@@ -108,20 +109,26 @@ class RecentFilesAdapter extends RecyclerView.Adapter<RecentFilesAdapter.ViewHol
         // Date and Size field only exist when we are displaying items in a list.
         if (mActivity.isViewModeList()) {
             String size;
+            String unit = "B";
             if (length < KB) {
-                size = Long.toString(length) + "B";
+                size = Long.toString(length);
             } else if (length < MB) {
-                size = Long.toString(length / KB) + "KB";
+                size = Long.toString(length / KB);
+                unit = "KB";
             } else {
-                size = Long.toString(length / MB) + "MB";
+                size = Long.toString(length / MB);
+                unit = "MB";
             }
             holder.fileSizeView.setText(size);
+            holder.fileSizeUnitView.setText(unit);
 
+            /* TODO Date not avaiable now
             if (date != null) {
                 SimpleDateFormat df = new SimpleDateFormat("dd MMM yyyy hh:ss");
                 //TODO format date
                 holder.fileDateView.setText(df.format(date));
             }
+            */
         }
     }
 
@@ -137,7 +144,7 @@ class RecentFilesAdapter extends RecyclerView.Adapter<RecentFilesAdapter.ViewHol
 
     class ViewHolder extends RecyclerView.ViewHolder {
 
-        TextView filenameView, fileSizeView, fileDateView;
+        TextView filenameView, fileSizeView, fileSizeUnitView/*, fileDateView*/;
         ImageView imageView;
 
         ViewHolder(View itemView) {
@@ -147,7 +154,8 @@ class RecentFilesAdapter extends RecyclerView.Adapter<RecentFilesAdapter.ViewHol
             // Check if view mode is List, only then initialise Size and Date field
             if (mActivity.isViewModeList()) {
                 fileSizeView = itemView.findViewById(R.id.file_item_size);
-                fileDateView = itemView.findViewById(R.id.file_item_date);
+                fileSizeUnitView = itemView.findViewById(R.id.file_item_size_unit);
+                //fileDateView = itemView.findViewById(R.id.file_item_date);
             }
         }
     }
diff --git a/android/app/src/main/res/layout/file_list_item.xml b/android/app/src/main/res/layout/file_list_item.xml
index 518885d4b..6164a6189 100644
--- a/android/app/src/main/res/layout/file_list_item.xml
+++ b/android/app/src/main/res/layout/file_list_item.xml
@@ -37,14 +37,23 @@
             android:layout_weight="2"
             android:ellipsize="end"
             android:maxLines="1"/>
+
         <TextView
             android:id="@+id/file_item_size"
-            tools:text="filesize"
             style="@style/ListItemText"
+            android:layout_width="50dp"
             android:layout_height="match_parent"
-            android:layout_width="0dp"
-            android:layout_weight="1" />
+            android:layout_marginEnd="4dp"
+            android:textAlignment="textEnd"
+            tools:text="0" />
+
         <TextView
+            android:id="@+id/file_item_size_unit"
+            style="@style/ListItemText"
+            android:layout_width="30dp"
+            android:layout_height="match_parent"
+            tools:text="B" />
+        <!--TextView
             android:id="@+id/file_item_date"
             tools:text="date/time"
             style="@style/ListItemText"
@@ -53,6 +62,6 @@
             android:layout_weight="2"
             android:ellipsize="end"
             android:gravity="end"
-            android:maxLines="1"/>
+            android:maxLines="1"/-->
     </LinearLayout>
 </LinearLayout>
commit da38fbb77cd78922176ba1970934d7b8bd441084
Author:     Jan Holesovsky <kendy at collabora.com>
AuthorDate: Fri Feb 21 11:27:25 2020 +0100
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Fri Feb 21 13:51:40 2020 +0100

    android shell: Don't overshoot the FAB, it looks strange.
    
    Also collapse it when the user has chosen one of the choices + code
    reorg / cleanup.
    
    Change-Id: Ifc5f6a12442022496dd8d9a66bccc6785ff2cc6e

diff --git a/android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java b/android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java
index d27a164db..dff39f242 100644
--- a/android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java
+++ b/android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java
@@ -86,7 +86,7 @@ import androidx.recyclerview.widget.GridLayoutManager;
 import androidx.recyclerview.widget.LinearLayoutManager;
 import androidx.recyclerview.widget.RecyclerView;
 
-public class LibreOfficeUIActivity extends AppCompatActivity implements SettingsListenerModel.OnSettingsPreferenceChangedListener, View.OnClickListener {
+public class LibreOfficeUIActivity extends AppCompatActivity implements SettingsListenerModel.OnSettingsPreferenceChangedListener {
     private String LOGTAG = LibreOfficeUIActivity.class.getSimpleName();
     private SharedPreferences prefs;
     private int filterMode = FileUtilities.ALL;
@@ -339,9 +339,7 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
 
                 supportInvalidateOptionsMenu();
                 navigationDrawer.requestFocus(); // Make keypad navigation easier
-                if (isFabMenuOpen) {
-                    collapseFabMenu(); //Collapse FAB Menu when drawer is opened
-                }
+                collapseFabMenu();
             }
 
             @Override
@@ -367,17 +365,7 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
             actionBar.setDisplayHomeAsUpEnabled(true);
         }
 
-        editFAB = findViewById(R.id.editFAB);
-        editFAB.setOnClickListener(this);
-        impressFAB = findViewById(R.id.newImpressFAB);
-        impressFAB.setOnClickListener(this);
-        writerFAB = findViewById(R.id.newWriterFAB);
-        writerFAB.setOnClickListener(this);
-        calcFAB = findViewById(R.id.newCalcFAB);
-        calcFAB.setOnClickListener(this);
-        writerLayout = findViewById(R.id.writerLayout);
-        impressLayout = findViewById(R.id.impressLayout);
-        calcLayout = findViewById(R.id.calcLayout);
+        setupFloatingActionButton();
 
         recentRecyclerView = findViewById(R.id.list_recent);
         noRecentItemsTextView = findViewById(R.id.no_recent_items_msg);
@@ -400,9 +388,54 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
         setupNavigationDrawer();
     }
 
+    /** Initialize the FloatingActionButton. */
+    private void setupFloatingActionButton() {
+        editFAB = findViewById(R.id.editFAB);
+        editFAB.setOnClickListener(new OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                if (isFabMenuOpen)
+                    collapseFabMenu();
+                else
+                    expandFabMenu();
+            }
+        });
+
+        writerFAB = findViewById(R.id.newWriterFAB);
+        writerFAB.setOnClickListener(new OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                createNewFileInputDialog(getString(R.string.new_textdocument) + FileUtilities.DEFAULT_WRITER_EXTENSION, "application/vnd.oasis.opendocument.text", CREATE_DOCUMENT_REQUEST_CODE);
+            }
+        });
+
+        calcFAB = findViewById(R.id.newCalcFAB);
+        calcFAB.setOnClickListener(new OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                createNewFileInputDialog(getString(R.string.new_spreadsheet) + FileUtilities.DEFAULT_SPREADSHEET_EXTENSION, "application/vnd.oasis.opendocument.spreadsheet", CREATE_SPREADSHEET_REQUEST_CODE);
+            }
+        });
+
+        impressFAB = findViewById(R.id.newImpressFAB);
+        impressFAB.setOnClickListener(new OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                createNewFileInputDialog(getString(R.string.new_presentation) + FileUtilities.DEFAULT_IMPRESS_EXTENSION, "application/vnd.oasis.opendocument.presentation", CREATE_PRESENTATION_REQUEST_CODE);
+            }
+        });
+
+        writerLayout = findViewById(R.id.writerLayout);
+        impressLayout = findViewById(R.id.impressLayout);
+        calcLayout = findViewById(R.id.calcLayout);
+    }
+
     /** Expand the Floating action button. */
     private void expandFabMenu() {
-        ViewCompat.animate(editFAB).rotation(45.0F).withLayer().setDuration(300).setInterpolator(new OvershootInterpolator(10.0F)).start();
+        if (isFabMenuOpen)
+            return;
+
+        ViewCompat.animate(editFAB).rotation(45f).withLayer().setDuration(300).setInterpolator(new OvershootInterpolator(0f)).start();
         impressLayout.startAnimation(fabOpenAnimation);
         writerLayout.startAnimation(fabOpenAnimation);
         calcLayout.startAnimation(fabOpenAnimation);
@@ -414,7 +447,10 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
 
     /** Collapse the Floating action button. */
     private void collapseFabMenu() {
-        ViewCompat.animate(editFAB).rotation(0.0F).withLayer().setDuration(300).setInterpolator(new OvershootInterpolator(10.0F)).start();
+        if (!isFabMenuOpen)
+            return;
+
+        ViewCompat.animate(editFAB).rotation(0f).withLayer().setDuration(300).setInterpolator(new OvershootInterpolator(0f)).start();
         writerLayout.startAnimation(fabCloseAnimation);
         impressLayout.startAnimation(fabCloseAnimation);
         calcLayout.startAnimation(fabCloseAnimation);
@@ -437,18 +473,14 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
 
         // close drawer if it was open
         drawerLayout.closeDrawer(navigationDrawer);
-        if (isFabMenuOpen) {
-            collapseFabMenu();
-        }
+        collapseFabMenu();
     }
 
     @Override
     public void onBackPressed() {
         if (drawerLayout.isDrawerOpen(navigationDrawer)) {
             drawerLayout.closeDrawer(navigationDrawer);
-            if (isFabMenuOpen) {
-                collapseFabMenu();
-            }
+            collapseFabMenu();
         } else if (isFabMenuOpen) {
             collapseFabMenu();
         } else {
@@ -511,6 +543,8 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
 
     /** Opens an Input dialog to get the name of new file. */
     private void createNewFileInputDialog(final String defaultFileName, final String mimeType, final int requestCode) {
+        collapseFabMenu();
+
         Intent i = new Intent(Intent.ACTION_CREATE_DOCUMENT);
 
         // The mime type and category must be set
@@ -621,6 +655,8 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
 
     /** Start an ACTION_OPEN_DOCUMENT Intent to trigger opening a document. */
     private void openDocument() {
+        collapseFabMenu();
+
         Intent i = new Intent(Intent.ACTION_OPEN_DOCUMENT);
 
         i.addCategory(Intent.CATEGORY_OPENABLE);
@@ -965,29 +1001,6 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
         }
     }
 
-    @Override
-    public void onClick(View v) {
-        int id = v.getId();
-        switch (id) {
-            case R.id.editFAB:
-                if (isFabMenuOpen) {
-                    collapseFabMenu();
-                } else {
-                    expandFabMenu();
-                }
-                break;
-            case R.id.newWriterFAB:
-                createNewFileInputDialog(getString(R.string.new_textdocument) + FileUtilities.DEFAULT_WRITER_EXTENSION, "application/vnd.oasis.opendocument.text", CREATE_DOCUMENT_REQUEST_CODE);
-                break;
-            case R.id.newImpressFAB:
-                createNewFileInputDialog(getString(R.string.new_presentation) + FileUtilities.DEFAULT_IMPRESS_EXTENSION, "application/vnd.oasis.opendocument.presentation", CREATE_PRESENTATION_REQUEST_CODE);
-                break;
-            case R.id.newCalcFAB:
-                createNewFileInputDialog(getString(R.string.new_spreadsheet) + FileUtilities.DEFAULT_SPREADSHEET_EXTENSION, "application/vnd.oasis.opendocument.spreadsheet", CREATE_SPREADSHEET_REQUEST_CODE);
-                break;
-        }
-    }
-
     private void setEditFABVisibility(final int visibility) {
         LibreOfficeApplication.getMainHandler().post(new Runnable() {
             @Override
commit 94d4a27d65d8c3e2e9e1d24106f6e7b60c33b5fb
Author:     Jan Holesovsky <kendy at collabora.com>
AuthorDate: Fri Feb 21 10:42:46 2020 +0100
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Fri Feb 21 13:51:40 2020 +0100

    android shell: Move ~all the functionality from menu to navigation drawer.
    
    And so far disable the various sorting possibilities, they are not
    working for the recent files (yet).
    
    Change-Id: I233f6cd05d15cf0c3f9f2bf940a8233ee5300cb7

diff --git a/android/app/.gitignore b/android/app/.gitignore
index 827faa729..8a20c82dd 100644
--- a/android/app/.gitignore
+++ b/android/app/.gitignore
@@ -3,6 +3,7 @@
 /build
 /appSettings.gradle
 /src/main/res/drawable/ic_launcher_brand.xml
+/src/main/res/drawable/drawer_header_brand.png
 /src/main/res/mipmap-anydpi-v26/ic_launcher_brand.xml
 /src/main/res/mipmap-hdpi/ic_launcher_brand.png
 /src/main/res/mipmap-mdpi/ic_launcher_brand.png
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 74fc8b904..25109c11f 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -108,20 +108,6 @@
                 <data android:mimeType="image/svg+xml" />
             </intent-filter>
         </activity>
-        <!-- Document Provider Settings Activity -->
-        <activity
-            android:name=".storage.DocumentProviderSettingsActivity"
-            android:label="@string/storage_provider_settings"
-            android:theme="@style/Theme.AppCompat.Light">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-            </intent-filter>
-        </activity>
-        <activity android:name=".storage.external.BrowserSelectorActivity" />
-        <activity
-            android:name=".storage.external.DirectoryBrowserActivity"
-            android:label="@string/directory_browser_label"
-            android:windowSoftInputMode="stateHidden" />
         <activity
             android:name=".ShowHTMLActivity"
             android:label="@string/title_activity_show_html" />
diff --git a/android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java b/android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java
index 91c71116f..d27a164db 100644
--- a/android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java
+++ b/android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java
@@ -210,6 +210,151 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
         recentRecyclerView.setAdapter(new RecentFilesAdapter(this, recentUris));
     }
 
+    /** Create the Navigation menu and set up the actions and everything there. */
+    public void setupNavigationDrawer() {
+        drawerLayout = findViewById(R.id.drawer_layout);
+        navigationDrawer = findViewById(R.id.navigation_drawer);
+        navigationDrawer.setNavigationItemSelectedListener(new NavigationView.OnNavigationItemSelectedListener() {
+            @Override
+            public boolean onNavigationItemSelected(@NonNull MenuItem item) {
+                switch (item.getItemId()) {
+                    /* TODO Currently we don't support sorting of the recent files
+                    case R.id.menu_filter_everything:
+                        item.setChecked(true);
+                        filterMode = FileUtilities.ALL;
+                        //openDirectory(currentDirectory);
+                        break;
+
+                    case R.id.menu_filter_documents:
+                        item.setChecked(true);
+                        filterMode = FileUtilities.DOC;
+                        //openDirectory(currentDirectory);
+                        break;
+
+                    case R.id.menu_filter_spreadsheets:
+                        item.setChecked(true);
+                        filterMode = FileUtilities.CALC;
+                        //openDirectory(currentDirectory);
+                        break;
+
+                    case R.id.menu_filter_presentations:
+                        item.setChecked(true);
+                        filterMode = FileUtilities.IMPRESS;
+                        //openDirectory(currentDirectory);
+                        break;
+
+                    case R.id.menu_sort_size_asc:
+                        sortMode = FileUtilities.SORT_SMALLEST;
+                        this.onResume();
+                        break;
+
+                    case R.id.menu_sort_size_desc:
+                        sortMode = FileUtilities.SORT_LARGEST;
+                        this.onResume();
+                        break;
+
+                    case R.id.menu_sort_az:
+                        sortMode = FileUtilities.SORT_AZ;
+                        this.onResume();
+                        break;
+
+                    case R.id.menu_sort_za:
+                        sortMode = FileUtilities.SORT_ZA;
+                        this.onResume();
+                        break;
+
+                    case R.id.menu_sort_modified_newest:
+                        sortMode = FileUtilities.SORT_NEWEST;
+                        this.onResume();
+                        break;
+
+                    case R.id.menu_sort_modified_oldest:
+                        sortMode = FileUtilities.SORT_OLDEST;
+                        this.onResume();
+                        break;
+                    */
+
+                    case R.id.action_about:
+                        AboutDialogFragment aboutDialogFragment = new AboutDialogFragment();
+                        aboutDialogFragment.show(getSupportFragmentManager(), "AboutDialogFragment");
+                        return true;
+
+                    /*case R.id.action_settings:
+                        startActivity(new Intent(getApplicationContext(), SettingsActivity.class));
+                        return true;*/
+                }
+                return false;
+            }
+        });
+        drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, R.string.document_locations, R.string.close_document_locations) {
+            @Override
+            public void onDrawerOpened(View drawerView) {
+                super.onDrawerOpened(drawerView);
+
+                /* TODO Currently we don't support sorting of the recent files
+                switch (sortMode) {
+                    case FileUtilities.SORT_SMALLEST:
+                        menu.findItem(R.id.menu_sort_size_asc).setChecked(true);
+                        break;
+
+                    case FileUtilities.SORT_LARGEST:
+                        menu.findItem(R.id.menu_sort_size_desc).setChecked(true);
+                        break;
+
+                    case FileUtilities.SORT_AZ:
+                        menu.findItem(R.id.menu_sort_az).setChecked(true);
+                        break;
+
+                    case FileUtilities.SORT_ZA:
+                        menu.findItem(R.id.menu_sort_za).setChecked(true);
+                        break;
+
+                    case FileUtilities.SORT_NEWEST:
+                        menu.findItem(R.id.menu_sort_modified_newest).setChecked(true);
+                        break;
+
+                    case FileUtilities.SORT_OLDEST:
+                        menu.findItem(R.id.menu_sort_modified_oldest).setChecked(true);
+                        break;
+                }
+
+                switch (filterMode) {
+                    case FileUtilities.ALL:
+                        menu.findItem(R.id.menu_filter_everything).setChecked(true);
+                        break;
+
+                    case FileUtilities.DOC:
+                        menu.findItem(R.id.menu_filter_documents).setChecked(true);
+                        break;
+
+                    case FileUtilities.CALC:
+                        menu.findItem(R.id.menu_filter_presentations).setChecked(true);
+                        break;
+
+                    case FileUtilities.IMPRESS:
+                        menu.findItem(R.id.menu_filter_presentations).setChecked(true);
+                        break;
+                }
+                */
+
+                supportInvalidateOptionsMenu();
+                navigationDrawer.requestFocus(); // Make keypad navigation easier
+                if (isFabMenuOpen) {
+                    collapseFabMenu(); //Collapse FAB Menu when drawer is opened
+                }
+            }
+
+            @Override
+            public void onDrawerClosed(View drawerView) {
+                super.onDrawerClosed(drawerView);
+                supportInvalidateOptionsMenu();
+            }
+        };
+        drawerToggle.setDrawerIndicatorEnabled(true);
+        drawerLayout.addDrawerListener(drawerToggle);
+        drawerToggle.syncState();
+    }
+
     public void createUI() {
         setContentView(R.layout.activity_document_browser);
 
@@ -249,78 +394,13 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
 
         updateRecentFiles();
 
+        // TODO allow context menu for the various files - for Open and Share
         //registerForContextMenu(fileRecyclerView);
 
-        //Setting up navigation drawer
-        drawerLayout = findViewById(R.id.drawer_layout);
-        navigationDrawer = findViewById(R.id.navigation_drawer);
-
-        navigationDrawer.setNavigationItemSelectedListener(new NavigationView.OnNavigationItemSelectedListener() {
-            @Override
-            public boolean onNavigationItemSelected(@NonNull MenuItem item) {
-
-                switch (item.getItemId()) {
-                    case R.id.menu_storage_preferences: {
-                        //startActivity(new Intent(LibreOfficeUIActivity.this, DocumentProviderSettingsActivity.class));
-                        return true;
-                    }
-
-                    case R.id.menu_provider_documents: {
-                        //switchToDocumentProvider(0);
-                        return true;
-                    }
-
-                    case R.id.menu_provider_filesystem: {
-                        //switchToDocumentProvider(1);
-                        return true;
-                    }
-
-                    case R.id.menu_provider_extsd: {
-                        //switchToDocumentProvider(DocumentProviderFactory.EXTSD_PROVIDER_INDEX);
-                        return true;
-                    }
-
-                    case R.id.menu_provider_otg: {
-                        //switchToDocumentProvider(3);
-                        return true;
-                    }
-
-                    case R.id.menu_provider_owncloud: {
-                        //switchToDocumentProvider(4);
-                        return true;
-                    }
-
-                    default:
-                        return false;
-                }
-
-
-            }
-        });
-        drawerToggle = new ActionBarDrawerToggle(this, drawerLayout,
-                R.string.document_locations, R.string.close_document_locations) {
-
-            @Override
-            public void onDrawerOpened(View drawerView) {
-                super.onDrawerOpened(drawerView);
-                supportInvalidateOptionsMenu();
-                navigationDrawer.requestFocus(); // Make keypad navigation easier
-                if (isFabMenuOpen) {
-                    collapseFabMenu(); //Collapse FAB Menu when drawer is opened
-                }
-            }
-
-            @Override
-            public void onDrawerClosed(View drawerView) {
-                super.onDrawerClosed(drawerView);
-                supportInvalidateOptionsMenu();
-            }
-        };
-        drawerToggle.setDrawerIndicatorEnabled(true);
-        drawerLayout.addDrawerListener(drawerToggle);
-        drawerToggle.syncState();
+        setupNavigationDrawer();
     }
 
+    /** Expand the Floating action button. */
     private void expandFabMenu() {
         ViewCompat.animate(editFAB).rotation(45.0F).withLayer().setDuration(300).setInterpolator(new OvershootInterpolator(10.0F)).start();
         impressLayout.startAnimation(fabOpenAnimation);
@@ -332,6 +412,7 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
         isFabMenuOpen = true;
     }
 
+    /** Collapse the Floating action button. */
     private void collapseFabMenu() {
         ViewCompat.animate(editFAB).rotation(0.0F).withLayer().setDuration(300).setInterpolator(new OvershootInterpolator(10.0F)).start();
         writerLayout.startAnimation(fabCloseAnimation);
@@ -529,61 +610,12 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
         */
     }
 
+    /** Setup the toolbar's menu. */
     @Override
     public boolean onCreateOptionsMenu(Menu menu) {
         MenuInflater inflater = getMenuInflater();
         inflater.inflate(R.menu.view_menu, menu);
 
-        switch (sortMode) {
-            case FileUtilities.SORT_SMALLEST: {
-                menu.findItem(R.id.menu_sort_size_asc).setChecked(true);
-            }
-            break;
-
-            case FileUtilities.SORT_LARGEST: {
-                menu.findItem(R.id.menu_sort_size_desc).setChecked(true);
-            }
-            break;
-
-            case FileUtilities.SORT_AZ: {
-                menu.findItem(R.id.menu_sort_az).setChecked(true);
-            }
-            break;
-
-            case FileUtilities.SORT_ZA: {
-                menu.findItem(R.id.menu_sort_za).setChecked(true);
-            }
-            break;
-
-            case FileUtilities.SORT_NEWEST: {
-                menu.findItem(R.id.menu_sort_modified_newest).setChecked(true);
-            }
-            break;
-
-            case FileUtilities.SORT_OLDEST: {
-                menu.findItem(R.id.menu_sort_modified_oldest).setChecked(true);
-            }
-            break;
-        }
-
-        switch (filterMode) {
-            case FileUtilities.ALL:
-                menu.findItem(R.id.menu_filter_everything).setChecked(true);
-                break;
-
-            case FileUtilities.DOC:
-                menu.findItem(R.id.menu_filter_documents).setChecked(true);
-                break;
-
-            case FileUtilities.CALC:
-                menu.findItem(R.id.menu_filter_presentations).setChecked(true);
-                break;
-
-            case FileUtilities.IMPRESS:
-                menu.findItem(R.id.menu_filter_presentations).setChecked(true);
-                break;
-        }
-
         return true;
     }
 
@@ -668,79 +700,6 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
                 openDocument();
                 break;
 
-            case android.R.id.home:
-                // TODO probably kill
-                break;
-
-            case R.id.menu_filter_everything:
-                item.setChecked(true);
-                filterMode = FileUtilities.ALL;
-                //openDirectory(currentDirectory);
-                break;
-
-            case R.id.menu_filter_documents:
-                item.setChecked(true);
-                filterMode = FileUtilities.DOC;
-                //openDirectory(currentDirectory);
-                break;
-
-            case R.id.menu_filter_spreadsheets:
-                item.setChecked(true);
-                filterMode = FileUtilities.CALC;
-                //openDirectory(currentDirectory);
-                break;
-
-            case R.id.menu_filter_presentations:
-                item.setChecked(true);
-                filterMode = FileUtilities.IMPRESS;
-                //openDirectory(currentDirectory);
-                break;
-
-            case R.id.menu_sort_size_asc: {
-                sortMode = FileUtilities.SORT_SMALLEST;
-                this.onResume();
-            }
-            break;
-
-            case R.id.menu_sort_size_desc: {
-                sortMode = FileUtilities.SORT_LARGEST;
-                this.onResume();
-            }
-            break;
-
-            case R.id.menu_sort_az: {
-                sortMode = FileUtilities.SORT_AZ;
-                this.onResume();
-            }
-            break;
-
-            case R.id.menu_sort_za: {
-                sortMode = FileUtilities.SORT_ZA;
-                this.onResume();
-            }
-            break;
-
-            case R.id.menu_sort_modified_newest: {
-                sortMode = FileUtilities.SORT_NEWEST;
-                this.onResume();
-            }
-            break;
-
-            case R.id.menu_sort_modified_oldest: {
-                sortMode = FileUtilities.SORT_OLDEST;
-                this.onResume();
-            }
-            break;
-
-            case R.id.action_about: {
-                AboutDialogFragment aboutDialogFragment = new AboutDialogFragment();
-                aboutDialogFragment.show(getSupportFragmentManager(), "AboutDialogFragment");
-            }
-            return true;
-            case R.id.action_settings:
-                startActivity(new Intent(getApplicationContext(), SettingsActivity.class));
-                return true;
-
             default:
                 return super.onOptionsItemSelected(item);
         }
diff --git a/android/app/src/main/res/drawable/drawer_header.png b/android/app/src/main/res/drawable/drawer_header.png
new file mode 100644
index 000000000..2786fd4ec
Binary files /dev/null and b/android/app/src/main/res/drawable/drawer_header.png differ
diff --git a/android/app/src/main/res/layout/activity_directory_browser.xml b/android/app/src/main/res/layout/activity_directory_browser.xml
deleted file mode 100644
index b03c6bbb1..000000000
--- a/android/app/src/main/res/layout/activity_directory_browser.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/fragment_container"
-    android:layout_width="match_parent" android:layout_height="match_parent">
-
-</FrameLayout>
\ No newline at end of file
diff --git a/android/app/src/main/res/layout/activity_document_browser.xml b/android/app/src/main/res/layout/activity_document_browser.xml
index 3e4fb298a..17b358fc0 100644
--- a/android/app/src/main/res/layout/activity_document_browser.xml
+++ b/android/app/src/main/res/layout/activity_document_browser.xml
@@ -253,6 +253,7 @@
             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>
diff --git a/android/app/src/main/res/layout/navigation_header.xml b/android/app/src/main/res/layout/navigation_header.xml
new file mode 100644
index 000000000..79889c36b
--- /dev/null
+++ b/android/app/src/main/res/layout/navigation_header.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:background="#ff000000">
+
+    <ImageView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:adjustViewBounds="true"
+        android:src="@drawable/drawer_header_brand"/>
+
+</LinearLayout>
diff --git a/android/app/src/main/res/menu/navigation_menu.xml b/android/app/src/main/res/menu/navigation_menu.xml
index 5d78aaf11..55f86fcab 100644
--- a/android/app/src/main/res/menu/navigation_menu.xml
+++ b/android/app/src/main/res/menu/navigation_menu.xml
@@ -1,35 +1,58 @@
 <?xml version="1.0" encoding="utf-8"?>
 <menu xmlns:android="http://schemas.android.com/apk/res/android">
-    <group
-        android:checkableBehavior="single"
-        android:id="@+id/group_providers">
-
-        <item android:id="@+id/menu_provider_documents"
-            android:title="@string/local_documents"
-            android:icon="@drawable/ic_folder_black_24dp" />
-
-        <item android:id="@+id/menu_provider_filesystem"
-            android:title="@string/local_file_system"
-            android:icon="@drawable/ic_storage_black_24dp"/>
-
-        <item android:id="@+id/menu_provider_extsd"
-            android:title="@string/external_sd_file_system"
-            android:icon="@drawable/ic_sd_card_black_24dp"/>
-
-        <item android:id="@+id/menu_provider_otg"
-            android:title="@string/otg_file_system"
-            android:icon="@drawable/ic_usb_black_24dp"/>
-
-        <item android:id="@+id/menu_provider_owncloud"
-            android:title="@string/remote_server"
-            android:icon="@drawable/ic_cloud_black_24dp"/>
-
-
-    </group>
-
-    <group android:orderInCategory="100">
-        <item android:id="@+id/menu_storage_preferences"
-            android:title="@string/storage_provider_settings"
-            android:icon="@drawable/ic_settings_black_24dp"/>
-    </group>
+    <!--item
+        android:id="@+id/menu_filter"
+        android:title="@string/filter"
+        android:icon="@drawable/ic_filter_list_black_24dp">
+        <menu>
+            <group
+                android:checkableBehavior="single">
+                <item
+                    android:id="@+id/menu_filter_everything"
+                    android:title="@string/filter_everything" />
+                <item
+                    android:id="@+id/menu_filter_documents"
+                    android:title="@string/filter_documents" />
+                <item
+                    android:id="@+id/menu_filter_spreadsheets"
+                    android:title="@string/filter_spreadsheets" />
+                <item
+                    android:id="@+id/menu_filter_presentations"
+                    android:title="@string/filter_presentations" />
+            </group>
+        </menu>
+    </item>
+
+    <item
+        android:id="@+id/menu_sort"
+        android:title="@string/sort"
+        android:icon="@drawable/ic_sort_by_alpha_black_24dp">
+        <menu>
+            <group android:checkableBehavior="single">
+                <item android:id="@+id/menu_sort_size_asc"
+                    android:title="@string/sort_smallest" />
+
+                <item android:id="@+id/menu_sort_size_desc"
+                    android:title="@string/sort_largest" />
+
+                <item android:id="@+id/menu_sort_az"
+                    android:title="@string/sort_az"/>
+
+                <item android:id="@+id/menu_sort_za"
+                    android:title="@string/sort_za"/>
+
+                <item android:id="@+id/menu_sort_modified_newest"
+                    android:title="@string/sort_newest"/>
+
+                <item android:id="@+id/menu_sort_modified_oldest"
+                    android:title="@string/sort_oldest"/>
+            </group>
+        </menu>
+    </item>
+
+    <item android:id="@+id/action_settings"
+          android:title="@string/action_settings"/-->
+
+    <item android:id="@+id/action_about"
+        android:title="@string/action_about"/>
 </menu>
diff --git a/android/app/src/main/res/menu/view_menu.xml b/android/app/src/main/res/menu/view_menu.xml
index baf29ac58..fb6fe599a 100644
--- a/android/app/src/main/res/menu/view_menu.xml
+++ b/android/app/src/main/res/menu/view_menu.xml
@@ -7,59 +7,4 @@
         app:showAsAction="always"
         android:icon="@drawable/ic_folder_black_24dp"/>
 
-    <item
-        android:id="@+id/menu_filter"
-        android:title="@string/filter"
-        android:icon="@drawable/ic_filter_list_black_24dp">
-        <menu>
-            <group
-                android:checkableBehavior="single">
-                <item
-                    android:id="@+id/menu_filter_everything"
-                    android:title="@string/filter_everything" />
-                <item
-                    android:id="@+id/menu_filter_documents"
-                    android:title="@string/filter_documents" />
-                <item
-                    android:id="@+id/menu_filter_spreadsheets"
-                    android:title="@string/filter_spreadsheets" />
-                <item
-                    android:id="@+id/menu_filter_presentations"
-                    android:title="@string/filter_presentations" />
-            </group>
-        </menu>
-    </item>
-
-    <item
-        android:id="@+id/menu_sort"
-        android:title="@string/sort"
-        android:icon="@drawable/ic_sort_by_alpha_black_24dp">
-        <menu>
-            <group android:checkableBehavior="single">
-                <item android:id="@+id/menu_sort_size_asc"
-                    android:title="@string/sort_smallest" />
-
-                <item android:id="@+id/menu_sort_size_desc"
-                    android:title="@string/sort_largest" />
-
-                <item android:id="@+id/menu_sort_az"
-                    android:title="@string/sort_az"/>
-
-                <item android:id="@+id/menu_sort_za"
-                    android:title="@string/sort_za"/>
-
-                <item android:id="@+id/menu_sort_modified_newest"
-                    android:title="@string/sort_newest"/>
-
-                <item android:id="@+id/menu_sort_modified_oldest"
-                    android:title="@string/sort_oldest"/>
-            </group>
-        </menu>
-    </item>
-    <item android:id="@+id/action_settings"
-          android:title="@string/action_settings"
-          android:orderInCategory="100"/>
-    <item android:id="@+id/action_about"
-        android:title="@string/action_about"
-        android:orderInCategory="100"/>
 </menu>
diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am
index ea6e31621..182e39768 100644
--- a/loleaflet/Makefile.am
+++ b/loleaflet/Makefile.am
@@ -190,6 +190,7 @@ if ENABLE_ANDROIDAPP
 	@if test -d "$(APP_BRANDING_DIR)" ; then cp -a "$(APP_BRANDING_DIR)/images/toolbar-bg-logo.svg" $(abs_top_srcdir)/android/lib/src/main/assets/dist/images/toolbar-bg.svg ; fi
 	@if test -d "$(APP_BRANDING_DIR)/android" ; then for I in `cd "$(APP_BRANDING_DIR)/android" && find . -type f` ; do mkdir -p $(abs_top_srcdir)/android/lib/src/main/res/`dirname $$I` ; cp -a "$(APP_BRANDING_DIR)/android/$$I" "$(abs_top_srcdir)/android/app/src/main/res/$$I" ; done ; fi
 	@if test -d "$(APP_BRANDING_DIR)/online-theme" ; then mkdir -p $(abs_top_srcdir)/android/lib/src/main/assets/share/theme_definitions ; cp -a "$(APP_BRANDING_DIR)/online-theme" "$(abs_top_srcdir)/android/lib/src/main/assets/share/theme_definitions/online" ; fi
+	@if test ! -e "$(abs_top_srcdir)/android/app/src/main/res/drawable/drawer_header_brand.png" ; then cp -a "$(abs_top_srcdir)/android/app/src/main/res/drawable/drawer_header.png" "$(abs_top_srcdir)/android/app/src/main/res/drawable/drawer_header_brand.png" ; fi
 	@touch "$(abs_top_srcdir)/android/app/src/main/res/drawable/ic_launcher_brand.xml" # to avoid problems with a missing resource in the non-branded builds
 	@echo
 	@echo "Copied JS, HTML and CSS to the Android project (android/lib/src/main/assets/dist)."
commit db201f81d95516ebd99773f6df00588e879b4e0c
Author:     Jan Holesovsky <kendy at collabora.com>
AuthorDate: Thu Feb 20 21:35:57 2020 +0100
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Fri Feb 21 13:51:40 2020 +0100

    android shell: Clean up the navigation menu's appearance.
    
    And add a hint to the user what to do when there are no recent files.
    
    Change-Id: Ic9e560b782a67b0a3f3bf622f16883cd1673c8df

diff --git a/android/app/src/main/res/layout/activity_document_browser.xml b/android/app/src/main/res/layout/activity_document_browser.xml
index 0611557fe..3e4fb298a 100644
--- a/android/app/src/main/res/layout/activity_document_browser.xml
+++ b/android/app/src/main/res/layout/activity_document_browser.xml
@@ -7,110 +7,243 @@
  file, You can obtain one at http://mozilla.org/MPL/2.0/.
  -->
 
-<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout 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:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical">
 
-
-    <!-- The toolbar -->
-    <androidx.appcompat.widget.Toolbar
-        android:id="@+id/toolbar"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:elevation="3dp"
-        android:background="@color/toolbar_background"
-        app:theme="@style/LibreOfficeTheme.Toolbar"
-        tools:theme="@style/LibreOfficeTheme.Toolbar"
-        app:popupTheme="@style/LibreOfficeTheme"
-        tools:layout_constraintTop_creator="1"
-        tools:layout_constraintRight_creator="1"
-        app:layout_constraintRight_toRightOf="parent"
-        tools:layout_constraintLeft_creator="1"
-        app:layout_constraintLeft_toLeftOf="parent"
-        app:layout_constraintTop_toTopOf="parent">
-
-    </androidx.appcompat.widget.Toolbar>
-
-
     <androidx.drawerlayout.widget.DrawerLayout
         android:id="@+id/drawer_layout"
-        android:layout_width="0dp"
-        android:layout_height="0dp"
-        tools:layout_constraintTop_creator="1"
-        tools:layout_constraintRight_creator="1"
-        tools:layout_constraintBottom_creator="1"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
         app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintRight_toRightOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/toolbar"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        tools:layout_constraintBottom_creator="1"
         tools:layout_constraintLeft_creator="1"
-        app:layout_constraintLeft_toLeftOf="parent">
+        tools:layout_constraintRight_creator="1"
+        tools:layout_constraintTop_creator="1">
 
         <!-- The content -->
-        <androidx.core.widget.NestedScrollView
+
+        <androidx.constraintlayout.widget.ConstraintLayout
             android:layout_width="match_parent"
-            android:layout_height="match_parent">
+            android:layout_height="match_parent"
+            android:layout_weight="1">
 
-            <LinearLayout
+            <androidx.appcompat.widget.Toolbar
+                android:id="@+id/toolbar"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:orientation="vertical"
-                android:divider="@color/doorhanger_divider_light"
-                android:showDividers="middle">
+                android:background="@color/toolbar_background"
+                android:elevation="3dp"
+                app:layout_constraintTop_toTopOf="parent"
+                app:popupTheme="@style/LibreOfficeTheme"
+                app:theme="@style/LibreOfficeTheme.Toolbar"
+                tools:layout_constraintLeft_creator="1"
+                tools:layout_constraintRight_creator="1"
+                tools:layout_constraintTop_creator="1"
+                tools:theme="@style/LibreOfficeTheme.Toolbar">
+
+            </androidx.appcompat.widget.Toolbar>
+
+            <ScrollView
+                android:layout_width="match_parent"
+                android:layout_height="0dp"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintTop_toBottomOf="@+id/toolbar">
 
                 <LinearLayout
                     android:layout_width="match_parent"
-                    android:layout_height="match_parent"
-                    android:orientation="horizontal">
+                    android:layout_height="0dp"
+                    android:orientation="vertical">
 
-                    <TextView
-                        android:id="@+id/header_recents"
+                    <LinearLayout
                         android:layout_width="match_parent"
-                        android:layout_height="48dp"
-                        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" />
+                        android:layout_height="wrap_content"
+                        android:orientation="horizontal">
+
+                        <TextView
+                            android:id="@+id/header_recents"
+                            android:layout_width="match_parent"
+                            android:layout_height="48dp"
+                            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>
+            </ScrollView>
 
-                <!--Recent files-->
-                <FrameLayout
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content">
+            <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"
+                android:visibility="invisible"
+                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" />
 
-                    <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" />
+            <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" />
 
-                    <TextView
-                        android:id="@+id/no_recent_items_msg"
-                        android:layout_width="wrap_content"
-                        android:layout_height="48dp"
-                        android:layout_gravity="center"
-                        android:gravity="center"
-                        android:textSize="14sp"
-                        android:text="@string/no_recent_items" />
+            </LinearLayout>
 
-                </FrameLayout>
+            <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>
 
-        </androidx.core.widget.NestedScrollView>
+            <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>
 
         <!-- The navigation drawer -->
         <com.google.android.material.navigation.NavigationView
@@ -119,118 +252,9 @@
             android:layout_height="match_parent"
             android:layout_gravity="start"
             android:background="@color/background_normal"
-            app:menu="@menu/navigation_menu"
-            android:theme="@style/LibreOfficeTheme.NavigationView" />
+            android:theme="@style/LibreOfficeTheme.NavigationView"
+            app:menu="@menu/navigation_menu" />
 
     </androidx.drawerlayout.widget.DrawerLayout>
 
-    <com.google.android.material.floatingactionbutton.FloatingActionButton
-        android:id="@+id/editFAB"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:clickable="true"
-        android:visibility="invisible"
-        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_marginBottom="@dimen/new_doc_fab_tweak_bottom"
-            android:layout_marginTop="@dimen/new_doc_fab_tweak_top"
-            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_marginBottom="@dimen/new_doc_fab_tweak_bottom"
-            android:layout_marginTop="@dimen/new_doc_fab_tweak_top"
-            android:clickable="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_marginBottom="@dimen/new_doc_fab_tweak_bottom"
-            android:layout_marginTop="@dimen/new_doc_fab_tweak_top"
-            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_marginBottom="@dimen/new_doc_fab_tweak_bottom"
-            android:layout_marginTop="@dimen/new_doc_fab_tweak_top"
-            android:clickable="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"
-        tools:visibility="visible"
-        app:layout_constraintBottom_toTopOf="@+id/impressLayout"
-        app:layout_constraintRight_toRightOf="@id/editFAB">
-
-        <TextView
-            android:id="@+id/newCalcTextView"
-            style="@style/NewDocumentTextView"
-            android:layout_marginBottom="@dimen/new_doc_fab_tweak_bottom"
-            android:layout_marginTop="@dimen/new_doc_fab_tweak_top"
-            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_marginBottom="@dimen/new_doc_fab_tweak_bottom"
-            android:layout_marginTop="@dimen/new_doc_fab_tweak_top"
-            android:clickable="true"
-            app:backgroundTint="@color/background_normal"
-            app:fabSize="mini"
-            app:srcCompat="@drawable/calc"
-            app:useCompatPadding="true" />
-
-    </LinearLayout>
-
-</androidx.constraintlayout.widget.ConstraintLayout>
+</LinearLayout>
diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml
index 4776a5b97..663779278 100644
--- a/android/app/src/main/res/values/strings.xml
+++ b/android/app/src/main/res/values/strings.xml
@@ -6,7 +6,7 @@
     <string name="app_description">$APP_NAME is a modern, easy-to-use, open source productivity suite for word processing, spreadsheets, presentations and more.</string>
     <string name="app_vendor">This release was supplied by $VENDOR.</string>
 
-    <string name="no_recent_items">No recent items</string>
+    <string name="no_recent_items">Please open a file using the folder icon in the toolbar.</string>
     <string name="no_items">No items</string>
     <string name="temp_file_saving_disabled">This file is read-only, saving is disabled.</string>
     <string name="file_exists_warning">A file with this name already exists, and will be overwritten.</string>


More information about the Libreoffice-commits mailing list