mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-25 10:05:49 +01:00
Better handling of end of summary items list
This commit is contained in:
parent
723bd6fb6e
commit
39a472216a
@ -119,10 +119,11 @@ public class ActivitySummaryDetail extends AbstractGBActivity {
|
||||
layout.setOnTouchListener(new SwipeEvents(this) {
|
||||
@Override
|
||||
public void onSwipeRight() {
|
||||
currentItem = items.getNextItem();
|
||||
if (currentItem != null) {
|
||||
makeSummaryHeader(currentItem);
|
||||
makeSummaryContent(currentItem);
|
||||
BaseActivitySummary newItem = items.getNextItem();
|
||||
if (newItem != null) {
|
||||
currentItem = newItem;
|
||||
makeSummaryHeader(newItem);
|
||||
makeSummaryContent(newItem);
|
||||
layout.startAnimation(animFadeRight);
|
||||
|
||||
} else {
|
||||
@ -132,10 +133,11 @@ public class ActivitySummaryDetail extends AbstractGBActivity {
|
||||
|
||||
@Override
|
||||
public void onSwipeLeft() {
|
||||
currentItem = items.getPrevItem();
|
||||
if (currentItem != null) {
|
||||
makeSummaryHeader(currentItem);
|
||||
makeSummaryContent(currentItem);
|
||||
BaseActivitySummary newItem = items.getPrevItem();
|
||||
if (newItem != null) {
|
||||
currentItem = newItem;
|
||||
makeSummaryHeader(newItem);
|
||||
makeSummaryContent(newItem);
|
||||
layout.startAnimation(animFadeLeft);
|
||||
} else {
|
||||
layout.startAnimation(animBounceLeft);
|
||||
|
Loading…
Reference in New Issue
Block a user