It is good policy to keep logic like this separate from the view. I'd
put the logic wherever you are getting the value from, before you send
that value to the TextView. In the onLocationChanged method of your
LocationListener implementation, for example, if you are using a
listener to receive location updates.

On Oct 3, 1:15 pm, Sonic <[email protected]> wrote:
> Thanks for that, but how would I get it to automatically watch the
> textview values of x to automatically stop the timer after reaching a
> specific value? Would I need to use some kind of listener?
>
> Thanks in advance.
>
> On Oct 3, 6:08 pm, Lance Nanek <[email protected]> wrote:
>
> > When you first go above the start threshold then set a member variable
> > to the time. When you go above the end threshold then subtract that
> > from the current time to get the time elapsed.
>
> > On Oct 3, 11:43 am, Sonic <[email protected]> wrote:
>
> > > Hi All,
>
> > > I'm wondering how I would go about the following:
>
> > > An int value is sent to a textview called X for example, the value of
> > > X is constantly changing, so x could equal any int. Now what Im unsure
> > > how to implement is, if we say X equals 10, I want to be able to time
> > > how long it takes inbetween the time X would be equal to 40 for
> > > example. The values of X = 10 and X = 40 are not going to be constant
> > > it will be gradually increasing, so all as I want to do is time how
> > > long it takes in seconds to reach a predefined value of X.
>
> > > Any ideas chaps?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to