getX and getY during Button Down

videodronesmp

New Member
Hello, I just downloaded the trial over the weekend and am liking it so far. I have been "programming as a hobby" with VB.net for the last several years and was trying to switch over to eclipse+Java for Android development and I was about to give up until I came across this program.

Anyway, now to the question I have.

I found Activity_Touch, which works as far as passing the x and y coords if you do not click on any control, these values also update/change when you keep the activity pressed and move around on the activity. Now my question is there any way to get the x and y values if you click and hold down on a button and slide to an empty spot on an activity/form?

Purpose: To let the user move a control from one part of activity to another. I see that on an ImageView there is not a Down event, only a Click and Long Click. With button there is a Down event that I may be able to work with, if I can find a way to see where user is on the screen.

I have found that I can do it by having user click the control and then clicking somewhere on the activity and it moves there with code, I would like a drag and drop way to do this though.

Thanks for any help!!
:sign0104:
 

videodronesmp

New Member
I added this transparent panel and using the touch event it looks like I will be able to do what I am after. Thanks for the quick reply and help on this.
 
Upvote 0

haddad

Member
Licensed User
Longtime User
hi
i want to knew how to get x and y for a view in activity when activity is loaded , for exemple , i want to knew the x and y for imageview

cordialement
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
hi
i want to knew how to get x and y for a view in activity when activity is loaded , for exemple , i want to knew the x and y for imageview

cordialement


dim x as float = imageview1.left
dim y as float = imageview1.top
 
Upvote 0

haddad

Member
Licensed User
Longtime User
tks you for your repense , i have two imageview i want if i click to the button de same imageview make a translat animation ,

with animtran1.InitializeTranslate("animation3",30%x,0%y+10dip,150%x,0%y+20dip)

that is why i need the original position before started animation
 
Upvote 0
Top