mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-17 11:25:34 -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"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent">
|
android:layout_height="fill_parent">
|
||||||
|
|
||||||
<ListView
|
<ListView
|
||||||
android:id="@+id/zimfilelist"
|
android:id="@+id/zimfilelist"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -30,4 +31,14 @@
|
|||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:visibility="gone">
|
android:visibility="gone">
|
||||||
</ProgressBar>
|
</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>
|
</RelativeLayout>
|
||||||
|
@ -62,7 +62,7 @@ public class ZimFileSelectActivity extends FragmentActivity
|
|||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
|
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
|
||||||
setProgressBarIndeterminateVisibility(true);
|
setProgressBarIndeterminateVisibility(true);
|
||||||
setContentView(R.layout.zimfilelist);
|
setContentView(R.layout.zimfilelist);
|
||||||
|
|
||||||
mZimFileList = (ListView) findViewById(R.id.zimfilelist);
|
mZimFileList = (ListView) findViewById(R.id.zimfilelist);
|
||||||
@ -150,7 +150,7 @@ public class ZimFileSelectActivity extends FragmentActivity
|
|||||||
|
|
||||||
// Done here to avoid that shown while loading.
|
// Done here to avoid that shown while loading.
|
||||||
mZimFileList.setEmptyView(findViewById(R.id.zimfilelist_nozimfilesfound_view));
|
mZimFileList.setEmptyView(findViewById(R.id.zimfilelist_nozimfilesfound_view));
|
||||||
setProgressBarIndeterminateVisibility(false);
|
setProgressBarIndeterminateVisibility(false);
|
||||||
mCursorAdapter.notifyDataSetChanged();
|
mCursorAdapter.notifyDataSetChanged();
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -277,10 +277,15 @@ public class ZimFileSelectActivity extends FragmentActivity
|
|||||||
|
|
||||||
ProgressBar mProgressBar;
|
ProgressBar mProgressBar;
|
||||||
|
|
||||||
|
TextView mProgressBarMessage;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPreExecute() {
|
protected void onPreExecute() {
|
||||||
mProgressBar = (ProgressBar) findViewById(R.id.progressBar);
|
mProgressBar = (ProgressBar) findViewById(R.id.progressBar);
|
||||||
|
mProgressBarMessage = (TextView) findViewById(R.id.progressbar_message);
|
||||||
|
|
||||||
mProgressBar.setVisibility(View.VISIBLE);
|
mProgressBar.setVisibility(View.VISIBLE);
|
||||||
|
mProgressBarMessage.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
super.onPreExecute();
|
super.onPreExecute();
|
||||||
}
|
}
|
||||||
@ -299,6 +304,7 @@ public class ZimFileSelectActivity extends FragmentActivity
|
|||||||
mZimFileList.setAdapter(mRescanAdapter);
|
mZimFileList.setAdapter(mRescanAdapter);
|
||||||
|
|
||||||
mProgressBar.setVisibility(View.GONE);
|
mProgressBar.setVisibility(View.GONE);
|
||||||
|
mProgressBarMessage.setVisibility(View.GONE);
|
||||||
|
|
||||||
super.onPostExecute(result);
|
super.onPostExecute(result);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user