mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 10:46:53 -04:00
Fixed ProgressBar.
This commit is contained in:
parent
5536b1a50a
commit
6ecc871f0f
@ -3,6 +3,7 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
|
||||
<ListView
|
||||
android:id="@+id/zimfilelist"
|
||||
android:layout_width="match_parent"
|
||||
@ -30,4 +31,14 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:visibility="gone">
|
||||
</ProgressBar>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/progressbar_message"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/rescan_fs_warning"
|
||||
android:layout_below="@id/progressBar"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:visibility="gone"/>
|
||||
</RelativeLayout>
|
||||
|
@ -62,7 +62,7 @@ public class ZimFileSelectActivity extends FragmentActivity
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
|
||||
setProgressBarIndeterminateVisibility(true);
|
||||
setProgressBarIndeterminateVisibility(true);
|
||||
setContentView(R.layout.zimfilelist);
|
||||
|
||||
mZimFileList = (ListView) findViewById(R.id.zimfilelist);
|
||||
@ -150,7 +150,7 @@ public class ZimFileSelectActivity extends FragmentActivity
|
||||
|
||||
// Done here to avoid that shown while loading.
|
||||
mZimFileList.setEmptyView(findViewById(R.id.zimfilelist_nozimfilesfound_view));
|
||||
setProgressBarIndeterminateVisibility(false);
|
||||
setProgressBarIndeterminateVisibility(false);
|
||||
mCursorAdapter.notifyDataSetChanged();
|
||||
|
||||
}
|
||||
@ -277,10 +277,15 @@ public class ZimFileSelectActivity extends FragmentActivity
|
||||
|
||||
ProgressBar mProgressBar;
|
||||
|
||||
TextView mProgressBarMessage;
|
||||
|
||||
@Override
|
||||
protected void onPreExecute() {
|
||||
mProgressBar = (ProgressBar) findViewById(R.id.progressBar);
|
||||
mProgressBarMessage = (TextView) findViewById(R.id.progressbar_message);
|
||||
|
||||
mProgressBar.setVisibility(View.VISIBLE);
|
||||
mProgressBarMessage.setVisibility(View.VISIBLE);
|
||||
|
||||
super.onPreExecute();
|
||||
}
|
||||
@ -299,6 +304,7 @@ public class ZimFileSelectActivity extends FragmentActivity
|
||||
mZimFileList.setAdapter(mRescanAdapter);
|
||||
|
||||
mProgressBar.setVisibility(View.GONE);
|
||||
mProgressBarMessage.setVisibility(View.GONE);
|
||||
|
||||
super.onPostExecute(result);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user