You can do that by setting the appropriate listeners.
ImageView iv = (ImageView)findViewById(R.id.ImageView01);
iv.setBackgroundResource(android.R.drawable.ic_delete); // You can set
your arbitrary image here.
iv.setOnTouchListener(new OnTouchListener(){
public boolean onTouch(View v, MotionEvent event){
//...
}
});
iv.setOnClickListener(new OnClickListener () {
public void onClick(View v){
//....
}
});
Balwinder Kaur
Open Source Development Center
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.
On Aug 14, 1:56 am, Long <[email protected]> wrote:
> Hi guys,
> I need some arbitrary shape imageView that can respond events.
> How can I do that?
>
> Thanks.
> Cheers.
> Long
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---