mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-22 12:03:09 -04:00
Fix for an android crash
This commit is contained in:
parent
b4be999b44
commit
f4c8d2beb8
@ -107,6 +107,8 @@ public class DownloadFragment extends Fragment {
|
|||||||
if (isAdded()) {
|
if (isAdded()) {
|
||||||
int position = Arrays.asList(mKeys).indexOf(notificationID);
|
int position = Arrays.asList(mKeys).indexOf(notificationID);
|
||||||
ViewGroup viewGroup = (ViewGroup) listView.getChildAt(position - listView.getFirstVisiblePosition());
|
ViewGroup viewGroup = (ViewGroup) listView.getChildAt(position - listView.getFirstVisiblePosition());
|
||||||
|
if (viewGroup == null)
|
||||||
|
return;
|
||||||
ProgressBar downloadProgress = (ProgressBar) viewGroup.findViewById(R.id.downloadProgress);
|
ProgressBar downloadProgress = (ProgressBar) viewGroup.findViewById(R.id.downloadProgress);
|
||||||
downloadProgress.setProgress(progress);
|
downloadProgress.setProgress(progress);
|
||||||
if (progress == 100) {
|
if (progress == 100) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user