[android-developers] MapView Overlay that does always keeps an item selected?

2010-02-13 Thread Fabian Sturm
Hi, I want to add an ItemizedOverlay to a MapView that always keeps one OverlayItem as the selected one. I indicate this by using a StateListDrawable with two different marker drawables. But right now, whenever I tap on the map and not hitting a marker, the last selected item will get

Re: [android-developers] MapView Overlay that does always keeps an item selected?

2010-02-13 Thread TreKing
On Sat, Feb 13, 2010 at 8:31 AM, Fabian Sturm f...@rtfs.org wrote: I want to add an ItemizedOverlay to a MapView that always keeps one OverlayItem as the selected one. Are you sure you want to do this? This goes against the standard behavior of deselecting when clicking somewhere on the map

Re: [android-developers] MapView Overlay that does always keeps an item selected?

2010-02-13 Thread Fabian Sturm
Hi, thanks for the hint! I already tried to implement this, but am now stuck with that setFocus works, but it does not raise the OverlayItem to the top. As is done if I select the item with a tap. So is there any chance to really select an item and not merely focusing it? Are you sure you want

Re: [android-developers] MapView Overlay that does always keeps an item selected?

2010-02-13 Thread TreKing
Hmm ... it should, as the currently focused item should be drawn last (on top) by default. Maybe try invalidating the view after resetting the focus to force a redraw and see if that works? On Sat, Feb 13, 2010 at 2:37 PM, Fabian Sturm f...@rtfs.org wrote: Hi, thanks for the hint! I already

Re: [android-developers] MapView Overlay that does always keeps an item selected?

2010-02-13 Thread Fabian Sturm
Hi, wow thanks a lot, your guess was right, I was missing an invalidate. Most of the time I would do an animateTo and that itself would trigger an invalidate :-) But unfortunately still not everything works. There seems to be a problem with focus handling. I can set the different items focus by