diff --git a/android-mapviewballoons-example/.classpath b/android-mapviewballoons-example/.classpath index a4763d1..3f9691c 100644 --- a/android-mapviewballoons-example/.classpath +++ b/android-mapviewballoons-example/.classpath @@ -1,8 +1,8 @@ - - + + diff --git a/android-mapviewballoons-example/src/mapviewballoons/example/custom/CustomItemizedOverlay.java b/android-mapviewballoons-example/src/mapviewballoons/example/custom/CustomItemizedOverlay.java index c0a6305..79d30dc 100644 --- a/android-mapviewballoons-example/src/mapviewballoons/example/custom/CustomItemizedOverlay.java +++ b/android-mapviewballoons-example/src/mapviewballoons/example/custom/CustomItemizedOverlay.java @@ -35,10 +35,17 @@ public class CustomItemizedOverlay extends BalloonItem public CustomItemizedOverlay(Drawable defaultMarker, MapView mapView) { super(boundCenter(defaultMarker), mapView); c = mapView.getContext(); + // Workaround for bug that Google refuses to fix: + // http://osdir.com/ml/AndroidDevelopers/2009-08/msg01605.html + // http://code.google.com/p/android/issues/detail?id=2035 + populate(); } public void addOverlay(CustomOverlayItem overlay) { m_overlays.add(overlay); + // Workaround for another issue with this class: + // http://groups.google.com/group/android-developers/browse_thread/thread/38b11314e34714c3 + setLastFocusedIndex(-1); populate(); } diff --git a/android-mapviewballoons-example/src/mapviewballoons/example/simple/SimpleItemizedOverlay.java b/android-mapviewballoons-example/src/mapviewballoons/example/simple/SimpleItemizedOverlay.java index 494103f..d9d849f 100644 --- a/android-mapviewballoons-example/src/mapviewballoons/example/simple/SimpleItemizedOverlay.java +++ b/android-mapviewballoons-example/src/mapviewballoons/example/simple/SimpleItemizedOverlay.java @@ -34,10 +34,17 @@ public class SimpleItemizedOverlay extends BalloonItemizedOverlay { public SimpleItemizedOverlay(Drawable defaultMarker, MapView mapView) { super(boundCenter(defaultMarker), mapView); c = mapView.getContext(); + // Workaround for bug that Google refuses to fix: + // http://osdir.com/ml/AndroidDevelopers/2009-08/msg01605.html + // http://code.google.com/p/android/issues/detail?id=2035 + populate(); } public void addOverlay(OverlayItem overlay) { m_overlays.add(overlay); + // Workaround for another issue with this class: + // http://groups.google.com/group/android-developers/browse_thread/thread/38b11314e34714c3 + setLastFocusedIndex(-1); populate(); }