I want this: when the user swipes the bottom window, the corresponding marker highlights, or when a marker is clicked, the corresponding window should be shown
Asked
Active
Viewed 106 times
1 Answers
0
- Create a collection of buildings.
- Create a RecyclerView with an adapter. The adapter must be filled with the collection of buildings.
- Draw Google Map.
- Add all pins over the map based on the collection of buildings.
- Add scroll listener to the RecyclerView so that you know current position. You can use
LinearSnapHelper
for snapping items. When a new item becomes active, deselect last pin on the map and select a new one. - Add touch listener for a pin.

CoolMind
- 26,736
- 15
- 188
- 224
-
thanks i will try. and can you answer this one https://stackoverflow.com/questions/58211784/i-want-to-know-exact-way-to-draw-outline-of-searched-area-in-google-map-in-andro – Kora69 Oct 03 '19 at 12:54
-
@Kora69, sorry, but I don't know. – CoolMind Oct 03 '19 at 12:57
-
i have implemented as you said when a marker is selected then i able to move the recycle view item in center position but i can't get this that when i move the recycle view child then the corresponding marker is selected? – Kora69 Oct 04 '19 at 14:40
-
@Kora69, you can create a new question in SO. I thought it was possible to draw a corresponding marker with large icon and previuos - with small. – CoolMind Oct 04 '19 at 15:28
-
@Kora69, note that referencing a marker outside of screen area (when it is invisible) may throw an exception. See https://stackoverflow.com/a/53829888/2914140. – CoolMind Oct 05 '19 at 12:45