Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to move a clickable button across the screen

Posted on 2014-10-15
3
Medium Priority
?
260 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 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

A short article about a problem I had getting the GPS LocationListener working.
Here, we have shared an easy step by step tutorial on how to download instagram images and videos on PC, Android Mobile and iOS mobile.
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

660 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