Kaydet (Commit) 614a9b04 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

android: show loading animation until the document is loaded

Change-Id: I98eeafe30e90d039175daea65428526a95c9ff1e
üst 2a61d1ee
......@@ -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>
......@@ -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;
}
......
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment