[android-developers] Re: Programming a target in an Android Application

2010-09-06 Thread kingh32
Thought I would post back and say thanks for helping me program the target. It was very straightforward in the end. And if someone else 'Googles' it in the future this is bound to come up! Identify the centre point, then use the X and Y coordinates of it as a correction factor Use Pythagoras

[android-developers] Re: Programming a target in an Android Application

2010-08-03 Thread kingh32
Hello - Thanks for your reply! What you have just mentioned is pretty much where I'm stuck! I don't know how to identify programatically where the target actually is. Would this be done using pixel coordinates? Is there a way to determine the resolution of the phone (screen) that the app is being

Re: [android-developers] Re: Programming a target in an Android Application

2010-08-03 Thread TreKing
On Tue, Aug 3, 2010 at 11:25 AM, kingh32 horaceb1...@gmail.com wrote: Would this be done using pixel coordinates? I guess. Is there a way to determine the resolution of the phone (screen) that the app is being run on and adjust these calculations accordingly?

Re: [android-developers] Re: Programming a target in an Android Application

2010-08-03 Thread TreKing
On Tue, Aug 3, 2010 at 11:25 AM, kingh32 horaceb1...@gmail.com wrote: Is there a way to determine the resolution of the phone (screen) that the app is being run on and adjust these calculations accordingly? Also, if I were you, I'd start by simply hard-coding a known size (like that of

[android-developers] Re: Programming a target in an Android Application

2010-08-03 Thread Bob Kerns
Everything -- both the positions and the image widget size -- will be in pixel coordinates. Actually, you don't need to know that -- just that they're the same. Hell, I could even be wrong; I'm not going to take out a microscope and check. If you have different coordinates for your image data (or

[android-developers] Re: Programming a target in an Android Application

2010-08-03 Thread kingh32
Thanks, both of you for your help. I imagine I'll be back with more questions soon! On Aug 3, 8:08 pm, Bob Kerns r...@acm.org wrote: Everything -- both the positions and the image widget size -- will be in pixel coordinates. Actually, you don't need to know that -- just that they're the same.