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. 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 even if you
> don't or don't know or might want to scale in the future or are
> paranoid), simply scale by the ratio of the image data : image widget.
> A scale factor of 1:1 won't cause you any trouble.
>
> There are times to be absolute, and times to be relative. This is one
> of the latter.
>
> On Aug 3, 9:25 am, kingh32 <horaceb1...@gmail.com> wrote:
>
>
>
> > 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 run on and adjust these calculations accordingly?
>
> > Thanks
>
> > On Aug 3, 4:52 pm, TreKing <treking...@gmail.com> wrote:
>
> > > On Tue, Aug 3, 2010 at 4:05 AM, Horace Bell-Gam <horaceb1...@gmail.com>wrote:
>
> > > > No, so far all I've been able to do is overlay an image of the target and
> > > > make the entire object respond to a click.
>
> > > You know:
> > > - The center of the image
> > > - The length of each band
> > > - Where the user clicks on the image (via onTouchEvents, me thinks)
> > > - Simple algebra to calculate the distance of a point from the center of the
> > > image (I hope)
>
> > > That's all you should need to figure out which band the user has touched.
>
> > > What have you tried thus far? Where are you stuck?
>
> > > --------------------------------------------------------------------------- ----------------------
> > > TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> > > transit tracking app for Android-powered devices
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
No comments:
Post a Comment