image pager: better progressbar placement

This commit is contained in:
Andrew Dolgov 2015-02-12 20:39:45 +03:00
parent f5b80fe39f
commit d544ea7689
2 changed files with 8 additions and 6 deletions

View File

@ -205,12 +205,10 @@ public class ArticleImagesPagerActivity extends CommonActivity implements Gestur
Bitmap bmp = ImageLoader.getInstance().loadImageSync(url, options);
int progress = (int) ((position / (float)urls[0].size()) * 10000);
if (bmp != null && bmp.getWidth() > 128 && bmp.getHeight() > 128) {
publishProgress(url, String.valueOf(progress));
publishProgress(url, String.valueOf(position));
} else {
publishProgress(null, String.valueOf(progress));
publishProgress(null, String.valueOf(position));
}
}
}
@ -227,6 +225,8 @@ public class ArticleImagesPagerActivity extends CommonActivity implements Gestur
m_adapter.notifyDataSetChanged();
}
Log.d(TAG, "progr=" + checkedUrl[1]);
m_progress.setProgress(Integer.valueOf(checkedUrl[1]));
} else {
cancel(true);

View File

@ -23,11 +23,13 @@
android:id="@+id/article_images_progress"
android:progress="0"
android:indeterminate="false"
android:layout_above="@+id/article_images_indicator"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
android:layout_alignParentEnd="true"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin" />
<me.relex.circleindicator.CircleIndicator
android:id="@+id/article_images_indicator"