[Libreoffice-commits] online.git: android/lib

Jan Holesovsky (via logerrit) logerrit at kemper.freedesktop.org
Wed Mar 18 17:29:31 UTC 2020


 android/lib/src/main/res/layout/lolib_dialog_loading.xml |   35 ++++++++-------
 1 file changed, 20 insertions(+), 15 deletions(-)

New commits:
commit bd3d5faef834c6bd3e5b15c2596bd39c6294d326
Author:     Jan Holesovsky <kendy at collabora.com>
AuthorDate: Wed Mar 18 11:51:11 2020 +0100
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Wed Mar 18 18:29:13 2020 +0100

    android: Always use the horizontal progress bar.
    
    It is hard have a determinate circular progress bar, so let's use
    horizontal progress bar for both determinate & indeterminate.
    
    They both look a bit different (the indeterminate is vertically
    narrower), but there was no simple trick to make them look the same, so
    I gave up for the moment.
    
    Change-Id: Ife3690204a8abd8bf17afe5c7d749a3ac2730c20
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90691
    Tested-by: Jan Holesovsky <kendy at collabora.com>
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/android/lib/src/main/res/layout/lolib_dialog_loading.xml b/android/lib/src/main/res/layout/lolib_dialog_loading.xml
index b0fef6554..6b07467f5 100644
--- a/android/lib/src/main/res/layout/lolib_dialog_loading.xml
+++ b/android/lib/src/main/res/layout/lolib_dialog_loading.xml
@@ -2,33 +2,38 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:orientation="horizontal"
-    android:padding="20dp">
+    android:orientation="vertical"
+    android:padding="24dp">
+
+    <TextView
+        android:id="@+id/progress_dialog_text"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:gravity="center"
+        android:paddingBottom="24dp"
+        android:textAlignment="center" />
 
     <FrameLayout
-        android:layout_width="wrap_content"
+        android:layout_width="match_parent"
         android:layout_height="wrap_content">
 
         <ProgressBar
             android:id="@+id/progress_indeterminate"
-            android:layout_width="50dp"
-            android:layout_height="50dp" />
+            style="?android:attr/progressBarStyleHorizontal"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:indeterminateOnly="true"
+            android:visibility="invisible"/>
 
         <ProgressBar
             android:id="@+id/progress_determinate"
             style="?android:attr/progressBarStyleHorizontal"
-            android:layout_width="50dp"
-            android:layout_height="50dp"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
             android:indeterminate="false"
-            android:min="0"
             android:max="100"
-            android:visibility="invisible" />
+            android:min="0"
+            android:visibility="visible" />
     </FrameLayout>
 
-    <TextView
-        android:id="@+id/progress_dialog_text"
-        android:layout_width="0dp"
-        android:layout_height="match_parent"
-        android:layout_weight="1"
-        android:gravity="center"/>
 </LinearLayout>


More information about the Libreoffice-commits mailing list