mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
added feature thumbnail recyclerview moves corresponding to the current picture (#4748)
Co-authored-by: Pratham2305 <Pratham2305@users.noreply.github.com>
This commit is contained in:
parent
81cadf09dd
commit
35e9a2c267
1 changed files with 4 additions and 0 deletions
|
|
@ -469,6 +469,8 @@ public class UploadActivity extends BaseActivity implements UploadContract.View,
|
||||||
if (index < fragments.size() - 1) {
|
if (index < fragments.size() - 1) {
|
||||||
vpUpload.setCurrentItem(index + 1, false);
|
vpUpload.setCurrentItem(index + 1, false);
|
||||||
fragments.get(index + 1).onBecameVisible();
|
fragments.get(index + 1).onBecameVisible();
|
||||||
|
((LinearLayoutManager) rvThumbnails.getLayoutManager())
|
||||||
|
.scrollToPositionWithOffset((index > 0) ? index-1 : 0, 0);
|
||||||
} else {
|
} else {
|
||||||
if(defaultKvStore.getInt(COUNTER_OF_CONSECUTIVE_UPLOADS_WITHOUT_COORDINATES, 0) >= 10){
|
if(defaultKvStore.getInt(COUNTER_OF_CONSECUTIVE_UPLOADS_WITHOUT_COORDINATES, 0) >= 10){
|
||||||
DialogUtil.showAlertDialog(this,
|
DialogUtil.showAlertDialog(this,
|
||||||
|
|
@ -490,6 +492,8 @@ public class UploadActivity extends BaseActivity implements UploadContract.View,
|
||||||
if (index != 0) {
|
if (index != 0) {
|
||||||
vpUpload.setCurrentItem(index - 1, true);
|
vpUpload.setCurrentItem(index - 1, true);
|
||||||
fragments.get(index - 1).onBecameVisible();
|
fragments.get(index - 1).onBecameVisible();
|
||||||
|
((LinearLayoutManager) rvThumbnails.getLayoutManager())
|
||||||
|
.scrollToPositionWithOffset((index > 3) ? index-2 : 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue