i want to add image in this mapview baloon please helpme
<p>i used this tutorial <a href="http://crazyandroidian.blogspot.com/2011/10/custom-mapview-popup-in-android.html" rel="nofollow">http://crazyandroidian.blogspot.com/2011/10/custom-mapview-popup-in-android.html</a> Please tell me how to add an image in a balloon tab. I want to add a location image in a marker point bubble. This code just shows a text message but no image.</p>

<pre><code>     package com.readystatesoftware.mapviewballoons;
 import mapviewballoons.example.R;
  import java.lang.reflect.Method;
 import java.util.List;
import android.graphics.drawable.Drawable;
 import android.util.Log;
 import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
 import android.view.ViewGroup.LayoutParams;
 import com.google.android.maps.GeoPoint;
 import com.google.android.maps.ItemizedOverlay;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;
import com.google.android.maps.Overlay;
 import com.google.android.maps.OverlayItem;

 public abstract class BalloonItemizedOverlay&lt;Item&gt; extends     
 ItemizedOverlay&lt;OverlayItem&gt;  {
  private MapView mapView;
  private BalloonOverlayView balloonView;
  private View clickRegion;
  private int viewOffset;
  final MapController mc;

   public BalloonItemizedOverlay(Drawable defaultMarker, MapView mapView) {
  super(defaultMarker);
  this.mapView = mapView;
  viewOffset = 0;
  mc = mapView.getController();
 }
 public void setBalloonBottomOffset(int pixels) {
  viewOffset = pixels;
 }
 protected boolean onBalloonTap(int index) {
  return false;
  }
 @Override
 protected final boolean onTap(int index) {
 boolean isRecycled;
 final int thisIndex;
 GeoPoint point;
 thisIndex = index;
 point = createItem(index).getPoint();
 if (balloonView == null) {
  balloonView = new BalloonOverlayView(mapView.getContext(), viewOffset);
  clickRegion = (View) balloonView.findViewById(R.id.balloon_inner_layout);
  isRecycled = false;
} else {
  isRecycled = true;
}
balloonView.setVisibility(View.GONE);
List&lt;Overlay&gt; mapOverlays = mapView.getOverlays();
if (mapOverlays.size() &gt; 1) {
  hideOtherBalloons(mapOverlays);
}
balloonView.setData(createItem(index));
MapView.LayoutParams params = new MapView.LayoutParams(
  LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, point,
  MapView.LayoutParams.BOTTOM_CENTER
);
params.mode = MapView.LayoutParams.MODE_MAP;
setBalloonTouchListener(thisIndex);
balloonView.setVisibility(View.VISIBLE);
if (isRecycled) {
  balloonView.setLayoutParams(params);
} else {
  mapView.addView(balloonView, params);
 }
 mc.animateTo(point);
return true;
 }
/**
   * Sets the visibility of this overlay's balloon view to GONE.
 */
 private void hideBalloon() {
  if (balloonView != null) {
   balloonView.setVisibility(View.GONE);
   }
 }
  private void hideOtherBalloons(List&lt;Overlay&gt; overlays) {
   for (Overlay overlay : overlays) {
   if (overlay instanceof BalloonItemizedOverlay&lt;?&gt; &amp;&amp; overlay != this) {
      ((BalloonItemizedOverlay&lt;?&gt;) overlay).hideBalloon();
  }
 }
 }
   private void setBalloonTouchListener(final int thisIndex) {
  try {
  @SuppressWarnings("unused")
  Method m = this.getClass().getDeclaredMethod("onBalloonTap", int.class);
  clickRegion.setOnTouchListener(new OnTouchListener() {
    public boolean onTouch(View v, MotionEvent event) {
      View l =  ((View) v.getParent()).findViewById(R.id.balloon_main_layout);
      Drawable d = l.getBackground();
      if (event.getAction() == MotionEvent.ACTION_DOWN) {
        int[] states = {android.R.attr.state_pressed};
        if (d.setState(states)) {
          d.invalidateSelf();
        }
        return true;
      } else if (event.getAction() == MotionEvent.ACTION_UP) {
        int newStates[] = {};
        if (d.setState(newStates)) {
          d.invalidateSelf();
        }
        // call overridden method
        onBalloonTap(thisIndex);
        return true;
      } else {
        return false;
      }
    }
  });
 } catch (SecurityException e) {
  Log.e("BalloonItemizedOverlay", "setBalloonTouchListener reflection     
  SecurityException");
  return;
 } catch (NoSuchMethodException e) {
  // method not overridden - do nothing
  return;
 }
 }
 }




          package com.readystatesoftware.mapviewballoons;

 import mapviewballoons.example.R;

 import android.content.Context;
 import android.view.Gravity;
import android.view.LayoutInflater;
 import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.TextView;

 import com.google.android.maps.OverlayItem;


  public class BalloonOverlayView extends FrameLayout {

  private LinearLayout layout;
  private TextView title;
  private TextView snippet;

  public BalloonOverlayView(Context context, int balloonBottomOffset) {

   super(context);

 setPadding(10, 0, 10, balloonBottomOffset);
layout = new LinearLayout(context);
layout.setVisibility(VISIBLE);

 LayoutInflater inflater = (LayoutInflater) context
 .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View v = inflater.inflate(R.layout.balloon_map_overlay, layout);
title = (TextView) v.findViewById(R.id.balloon_item_title);
snippet = (TextView) v.findViewById(R.id.balloon_item_snippet);

 ImageView close = (ImageView) v.findViewById(R.id.close_img_button);
 close.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
 layout.setVisibility(GONE);
}
});

   FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(
 LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
 params.gravity = Gravity.NO_GRAVITY;

addView(layout, params);

}
public void setData(OverlayItem item) {
layout.setVisibility(VISIBLE);
if (item.getTitle() != null) {
title.setVisibility(VISIBLE);
title.setText(item.getTitle());
 } else {
title.setVisibility(GONE);
}
if (item.getSnippet() != null) {
snippet.setVisibility(VISIBLE);
 snippet.setText(item.getSnippet());
 } else {
snippet.setVisibility(GONE);
}
}

}









            package mapviewballoons.example;

   import java.util.List;

  import android.graphics.drawable.Drawable;
  import android.os.Bundle;

 import com.google.android.maps.GeoPoint;
  import com.google.android.maps.MapActivity;
 import com.google.android.maps.MapController;
 import com.google.android.maps.MapView;
 import com.google.android.maps.Overlay;
 import com.google.android.maps.OverlayItem;

 public class MyMap extends MapActivity {

 MapView mapView;
 List&lt;Overlay&gt; mapOverlays;
 Drawable drawable;
 Drawable drawable2;
 MyItemizedOverlay itemizedOverlay;
 MyItemizedOverlay itemizedOverlay2;
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    mapView = (MapView) findViewById(R.id.mapview);
  mapView.setBuiltInZoomControls(true);
  mapOverlays = mapView.getOverlays();
 // first overlay
 drawable = getResources().getDrawable(R.drawable.marker);
 itemizedOverlay = new MyItemizedOverlay(drawable, mapView);
 GeoPoint point = new GeoPoint((int)(51.5174723*1E6),(int)(-0.0899537*1E6));
 OverlayItem overlayItem = new OverlayItem(point, "Umar Shafique", 
  "(here goes 1)");
  itemizedOverlay.addOverlay(overlayItem);
 GeoPoint point2 = new GeoPoint((int)(51.515259*1E6),(int)(-0.086623*1E6));
 OverlayItem overlayItem2 = new OverlayItem(point2, "Abdul Karim", 
 "here goes 2");
 itemizedOverlay.addOverlay(overlayItem2);
 mapOverlays.add(itemizedOverlay);
 // second overlay
 drawable2 = getResources().getDrawable(R.drawable.marker2);
 itemizedOverlay2 = new MyItemizedOverlay(drawable2, mapView);
 GeoPoint point3 = new GeoPoint((int)(51.513329*1E6),(int)(-0.08896*1E6));
 OverlayItem overlayItem3 = new OverlayItem(point3, "Arslan Ilyas", 
 "here goes 3");
 itemizedOverlay2.addOverlay(overlayItem3);
 GeoPoint point4 = new GeoPoint((int)(51.51738*1E6),(int)(-0.08186*1E6));
 OverlayItem overlayItem4 = new OverlayItem(point4, "Ahsan", 
 "here goes 4");
 itemizedOverlay2.addOverlay(overlayItem4);
 mapOverlays.add(itemizedOverlay2);
 final MapController mc = mapView.getController();
 mc.animateTo(point2);
 mc.setZoom(16);
}
@Override
protected boolean isRouteDisplayed() {
 return false;
}
</code></pre>

<p>}</p>
