Solved

How to move a clickable button across the screen

Posted on 2014-10-15
3
240 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A short article about problems I had with the new location API and permissions in Marshmallow
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
This video is in connection to the article "The case of a missing mobile phone (https://www.experts-exchange.com/articles/28474/The-Case-of-a-Missing-Mobile-Phone.html)". It will help one to understand clearly the steps to track a lost android phone.
Suggested Courses

751 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