[Libreoffice-commits] core.git: android/source

Ximeng Zu uznomis at yahoo.com
Tue May 9 17:46:09 UTC 2017


 android/source/res/layout/activity_main.xml                          |   33 ++++++----
 android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java |    2 
 2 files changed, 21 insertions(+), 14 deletions(-)

New commits:
commit 5c2833c4edf88ab7f9ad9b6165829c149432aae5
Author: Ximeng Zu <uznomis at yahoo.com>
Date:   Tue Apr 25 09:22:50 2017 -0500

    tdf#107415 android: appbar invisible on lower version
    
    Rearranged activity_main.xml in order to fix the bug
    of app bar invisible on lower versions of Android
    devices.
    
    Change-Id: Ic4ec9435ce9ef55a2596600c143114c899c30ac2
    Reviewed-on: https://gerrit.libreoffice.org/36950
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/android/source/res/layout/activity_main.xml b/android/source/res/layout/activity_main.xml
index 1ad3e3836f24..bfa575b57f36 100644
--- a/android/source/res/layout/activity_main.xml
+++ b/android/source/res/layout/activity_main.xml
@@ -13,24 +13,28 @@
         android:layout_width="match_parent"
         android:layout_height="match_parent">
 
-        <android.support.v7.widget.Toolbar
-            android:id="@+id/toolbar"
-            android:layout_width="match_parent"
-            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" />
-
-        <include layout="@layout/toolbar_bottom"/>
-
         <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:layout_below="@+id/toolbar"
             android:orientation="vertical">
 
+            <android.support.design.widget.AppBarLayout
+                android:id="@+id/appBar"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+
+                <android.support.v7.widget.Toolbar
+                    android:id="@+id/toolbar"
+                    android:layout_width="match_parent"
+                    android:layout_height="?attr/actionBarSize"
+                    android:elevation="3dp"
+                    android:background="@color/toolbar_background"
+                    app:theme="@style/LibreOfficeTheme.Toolbar"
+                    tools:theme="@style/LibreOfficeTheme.Toolbar"
+                    app:popupTheme="@style/LibreOfficeTheme" />
+
+            </android.support.design.widget.AppBarLayout>
+
             <RelativeLayout
                 android:id="@+id/gecko_layout"
                 android:layout_width="match_parent"
@@ -50,6 +54,8 @@
             </RelativeLayout>
         </LinearLayout>
 
+        <include layout="@layout/toolbar_bottom"/>
+
         <RelativeLayout
             android:id="@+id/loadingPanel"
             android:layout_width="match_parent"
@@ -65,6 +71,7 @@
 
         </RelativeLayout>
 
+        <!--What's the use of this view? Can it be removed?-->
         <View
             android:layout_width="match_parent"
             android:layout_height="match_parent"/>
diff --git a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
index 6a0d033b530f..b653c437c644 100755
--- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
+++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
@@ -560,6 +560,7 @@ public class LibreOfficeMainActivity extends AppCompatActivity {
                     hideBottomToolbar();
                 } else {
                     showBottomToolbar();
+                    findViewById(R.id.search_toolbar).setVisibility(View.GONE);
                     findViewById(R.id.formatting_toolbar).setVisibility(View.VISIBLE);
                     hideSoftKeyboardDirect();
                     isSearchToolbarOpen=false;
@@ -649,7 +650,6 @@ public class LibreOfficeMainActivity extends AppCompatActivity {
     public void openDrawer() {
         mDrawerLayout.openDrawer(mDrawerList);
         hideBottomToolbar();
-        hideFormattingToolbar();
     }
 
     public void showAbout() {


More information about the Libreoffice-commits mailing list