Hi

Pardon for posting this message multiple times as I don't see my
message in the group.

I have a table layout with various ImageButton objects. I'm using XML
layout instead of custom view class. I'd like to move an image from
one ImageButton object to another like moving a chess piece by
capturing the target piece.

How can I obtain the target ImageButton object based on the current
coordinates in the MotionEvent object and copy the image source to
target button? I'm using a listener as in the following code snippet.

class BoardOnTouchListener implements OnTouchListener {
        @Override
        public boolean onTouch(View v, MotionEvent event) {
                switch(v.getId()) {
                        case R.id.a8: {
                                                   // drop image from
source to target view ???
                }
                }
}

Thanks
Chandru

--~--~---------~--~----~------------~-------~--~----~
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