furby wrote:
> To be sure that you have some idea of what I am talking about, here is
> the code for the entire class :
>
> import java.util.ArrayList;
>
> import android.graphics.drawable.Drawable;
> import android.widget.Toast;
>
> import com.google.android.maps.ItemizedOverlay;
> import com.google.android.maps.OverlayItem;
>
> public class HelloItemizedOverlay extends ItemizedOverlay {
> private ArrayList<OverlayItem> mOverlays = new ArrayList<OverlayItem>
> ();
>
> public HelloItemizedOverlay(Drawable defaultMarker) {
> super(boundCenterBottom(defaultMarker));
> }
>
> @Override
> protected OverlayItem createItem(int i) {
> return mOverlays.get(i);
> }
>
>
> @Override
> public int size() {
> return mOverlays.size();
> }
>
> public void addOverlay(OverlayItem overlay) {
> mOverlays.add(overlay);
> populate();
> }
>
> protected boolean onTap(int index) {
> Toast.makeText(HelloItemizedOverlay.this, "TEST",
> Toast.LENGTH_SHORT).show();
> return super.onTap(index);
> }
> }
The first parameter to makeText() needs to be a Context, such as an
Activity.
--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy
_Android Programming Tutorials_ Version 1.0 Available!
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en