From f91a4b2e087037f7281938e5eedfd5a973161ba3 Mon Sep 17 00:00:00 2001 From: Kedi Xu Date: Thu, 8 Sep 2016 11:11:11 +0800 Subject: SnapdragonGallery: Fix first picture thumbnail doesn't show When delete the last picture and add one picture, the first picture's thumbnail doesn't show. Change-Id: I5d73f11a28d2f649e102ee127909632cc446fd75 CRs-Fixed: 1062720 --- src/com/android/gallery3d/ui/TimeLineSlotView.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) mode change 100644 => 100755 src/com/android/gallery3d/ui/TimeLineSlotView.java (limited to 'src/com') diff --git a/src/com/android/gallery3d/ui/TimeLineSlotView.java b/src/com/android/gallery3d/ui/TimeLineSlotView.java old mode 100644 new mode 100755 index 329ea75e3..7dcf4ef5f --- a/src/com/android/gallery3d/ui/TimeLineSlotView.java +++ b/src/com/android/gallery3d/ui/TimeLineSlotView.java @@ -589,7 +589,9 @@ public class TimeLineSlotView extends GLView { if (mSlotCount != null) { Slot begin = getSlotByPosition(0, mScrollPosition, true, false), end = getSlotByPosition(0, mScrollPosition + mHeight, true, true); - if (begin != null && end != null) { + if (begin == null && end != null && end.index == 0) { + setVisibleRange(0, 0); + } else if (begin != null && end != null) { setVisibleRange(begin.index, end.index); } } -- cgit v1.2.3