Solved

How to move a clickable button across the screen

Posted on 2014-10-15
3
253 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 40382026
Homework?
0
 
LVL 9

Author Comment

by:BobHavertyComh
ID: 40382101
No.
0
 
LVL 17

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

This is an explanation of a simple data model to help parse a JSON feed
This article shows how to use a free utility called 'Parkdale' to easily test the performance and benchmark any Hard Drive(s) installed in your computer. We also look at RAM Disks and their speed comparisons.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

617 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