Solved

How to move a clickable button across the screen

Posted on 2014-10-15
3
231 Views
Last Modified: 2014-11-13
I'm looking for a simple way or tutorial for making a simple android activity that has a clickable button that slowly moves across the x axis of the screen and remains clickable no matter where it is. I want my onClick method to write to logcat the x,y coordinates of the button each time it is clicked. That's all.

Thanks.
0
Comment
Question by:BobHavertyComh
3 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 40382026
Homework?
0
 
LVL 9

Author Comment

by:BobHavertyComh
ID: 40382101
No.
0
 
LVL 16

Accepted Solution

by:
Chris Harte earned 500 total points
ID: 40384662
You are going to have to use an animation of a bitmap on a This_Surface not a button. An

onTouch (View v, MotionEvent m)

will capture the location of the press to a Point variable. Not a huge project but not straight forward either.
Here are some tutorials that will get you started, in particular videos 62, 68 and 70.

https://buckysroom.org/videos.php?cat=6
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
javap bin 2 22
how to add new optional parameter to JSP 1 25
RTSP blocked by AT&T? 11 26
servlet example issue 6 27
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
The case of the missing phone talks about the way a small electronic gadget (the mobile phone) has penetrated into our lives and has made us addicted to it.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This video teaches viewers about errors in exception handling.

947 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now