android/experimental/LOAndroid3/res/layout/activity_main.xml | 12 ++++++++++ android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java | 7 +++++ android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java | 8 ++++++ 3 files changed, 27 insertions(+)
New commits: commit 3d86ed49d5278568eef6441c71fcd4001edae392 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.com> Date: Tue Sep 30 18:00:54 2014 +0200 android: show loading animation until the document is loaded Change-Id: I98eeafe30e90d039175daea65428526a95c9ff1e diff --git a/android/experimental/LOAndroid3/res/layout/activity_main.xml b/android/experimental/LOAndroid3/res/layout/activity_main.xml index 9ada4d3..799f591 100644 --- a/android/experimental/LOAndroid3/res/layout/activity_main.xml +++ b/android/experimental/LOAndroid3/res/layout/activity_main.xml @@ -44,4 +44,16 @@ android:background="#9FFF" android:choiceMode="singleChoice"/> + <RelativeLayout + android:id="@+id/loadingPanel" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:gravity="center" > + + <ProgressBar + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:indeterminate="true" /> + </RelativeLayout> + </android.support.v4.widget.DrawerLayout> diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java index ef75ae5..54478bf 100644 --- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java +++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java @@ -76,6 +76,13 @@ public class LOKitThread extends Thread { boolean isReady = mTileProvider.isReady(); if (isReady) { refresh(); + LOKitShell.getMainHandler().post(new Runnable() { + @Override + public void run() { + LibreOfficeMainActivity.mAppContext.hideProgressBar(); + } + }); + } return isReady; } diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java index 64d70d0..a37438e 100644 --- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java +++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java @@ -195,6 +195,14 @@ public class LibreOfficeMainActivity extends Activity { } + public void showProgressBar() { + findViewById(R.id.loadingPanel).setVisibility(View.VISIBLE); + } + + public void hideProgressBar() { + findViewById(R.id.loadingPanel).setVisibility(View.GONE); + } + private class DocumentPartClickListener implements android.widget.AdapterView.OnItemClickListener { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits