diff options
author | Jan Holesovsky <kendy@collabora.com> | 2020-03-18 11:51:11 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2020-03-18 18:29:13 +0100 |
commit | bd3d5faef834c6bd3e5b15c2596bd39c6294d326 (patch) | |
tree | 743cbc123430687979b71f508281dcc8885017e9 | |
parent | 9f44d03471954686294ff6f91125c5ec7861c297 (diff) |
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@collabora.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
-rw-r--r-- | android/lib/src/main/res/layout/lolib_dialog_loading.xml | 35 |
1 files changed, 20 insertions, 15 deletions
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> |