diff --git a/android/src/com/mapswithme/maps/widget/placepage/GuidesGalleryViewRenderer.java b/android/src/com/mapswithme/maps/widget/placepage/GuidesGalleryViewRenderer.java index 1ce7b9104b..422bdb0b8d 100644 --- a/android/src/com/mapswithme/maps/widget/placepage/GuidesGalleryViewRenderer.java +++ b/android/src/com/mapswithme/maps/widget/placepage/GuidesGalleryViewRenderer.java @@ -23,6 +23,8 @@ import com.mapswithme.maps.guides.GuidesGalleryListener; import com.mapswithme.maps.maplayer.guides.GuidesManager; import com.mapswithme.maps.maplayer.guides.OnGuidesGalleryChangedListener; import com.mapswithme.maps.widget.recycler.ItemDecoratorFactory; +import com.mapswithme.util.log.Logger; +import com.mapswithme.util.log.LoggerFactory; import com.mapswithme.util.statistics.GalleryPlacement; import java.util.List; @@ -32,7 +34,8 @@ public class GuidesGalleryViewRenderer implements PlacePageViewRenderer { - smoothScrollToPosition(mActivePosition); - setActiveGuide(mActivePosition); - }); + setAdapterForGallery(mGallery); + GuidesManager manager = GuidesManager.from(mRecyclerView.getContext()); + String guideId = manager.getActiveGuide(); + scrollToActiveGuide(mGallery, guideId, false); } @Override @@ -271,6 +275,7 @@ public class GuidesGalleryViewRenderer implements PlacePageViewRenderer smoothScrollToPosition(activePosition)); + return; + } + + setActiveGuide(activePosition); + mLayoutManager.scrollToPosition(activePosition); } private static int findPositionByGuideId(@NonNull GuidesGallery gallery, @NonNull String guideId)