how to set separate toast message for 2 bitmap in android?
<pre><code>public class Sample2 extends Activity  {

private SampleView sView;
private static int displayWidth = 100;    //movement area
private static int displayHeight = 100;
float angle = 0;

@Override
public void onCreate(Bundle icicle) {
    super.onCreate(icicle);

    sView = new SampleView(this);
    setContentView(sView);


     }//oncreate

private class SampleView extends View {
    Context con;
    private Rect displayRect = null; //rect we display to
    private int scrollRectX = 0; //current left location of scroll rect
    private int scrollRectY = 0; //current top location of scroll rect
    private float scrollByX = 0; //scroll by amounts
    private float scrollByY = 0;
    private float startX = 0;   //track x from one ACTION_MOVE to the next
    private float startY = 0;   //track y from one ACTION_MOVE to the next
    private int state = 0;


    Bitmap bitmap2;


    public SampleView(Context context) {
        super(context);
        displayRect = new Rect(0, 0, displayWidth, displayHeight);
        }//constructor

  public boolean onTouchEvent(MotionEvent event) {
    float x;
    float y;

       switch (event.getAction()) {

                case MotionEvent.ACTION_DOWN: 
                    //Initial down event location.
                        startX = event.getRawX();
                        startY = event.getRawY()-50;
                       // Log.e("TOUCHED",startY+" "+(scrollRectY+displayHeight));
                        if (((startX&gt;scrollRectX)&amp;(startX&lt;(scrollRectX+displayWidth)))&amp;
                           ((startY&gt;scrollRectY)&amp;(startY&lt;(scrollRectY+displayHeight)))) state = 1;
                        //Log.e("TOUCHED","State "+state);
                        break;
                case MotionEvent.ACTION_MOVE:
                        x = event.getRawX();
                        y = event.getRawY()-50;                            
                        scrollByX = x - startX;
                        scrollByY = y - startY;
                        startX = x; 
                        startY = y;
                        if (state != 0) invalidate(); //move it
                        break;
                case MotionEvent.ACTION_UP:
                        x = event.getRawX();
                        y = event.getRawY()-50;
                        scrollByX = x - startX;
                        scrollByY = y - startY;
                        startX = x; 
                        startY = y;
                        state = 0;
                        invalidate();
                       break;
        }//switch
        return true;
    }//ontouch

protected void onDraw(Canvas canvas) {
   scrollRectX = scrollRectX+(int)scrollByX;
   scrollRectY = scrollRectY+(int)scrollByY;
   displayRect.set(scrollRectX,scrollRectY,scrollRectX+displayWidth,
                   scrollRectY+displayHeight);
   Paint paint = new Paint();
   Bitmap bitmap1 = BitmapFactory.decodeResource(getResources(),R.drawable.ic_launcher);
   bitmap2= BitmapFactory.decodeResource(getResources(),R.drawable.ic_launcher).copy(Config.RGB_565, true);
   canvas.drawBitmap(bitmap2, null, displayRect, paint);

//TODO: Fill In Methods Etc.
}
}
}
</code></pre>

<p>i have used this code....now my question is this how to set separate toast messages for 2 bitmap in  android?....if i touch in background rectangle it shows toast message and if i touch on image it shows another toast message by using if condition on ontouchevents....plz any1 can say this....</p>
