Thanks for your advice.
I need to calculate whether the event happens
inside my shape in onTouch or onClick, right?

Or the framework can do that according to the alpha panel of the
background image?

Anyway, I will do some experiments.



Cheers.
Long

On Aug 15, 1:20 am, "Balwinder Kaur (T-Mobile USA)" <balwinder.k...@t-
mobile.com> wrote:
> 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 <long...@gmail.com> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to