[android-developers] Re: How to determine when a ScrollView has reached the bottom

2009-04-09 Thread Al

This was a major headache for me also. Finally found the solution:

int calc = sv.getHeight() + sv.getScrollY(); //where sv is a
scrollview
boolean atBottom = tv.getBottom() - calc == 0; //where tv is a
textview

On Apr 9, 6:23 am, "nwmotog...@gmail.com" 
wrote:
> I have a TextView inside a ScrollView and I have loaded it with a
> bunch of text.  When the ScrollView gets to the bottom/top I would
> like to load the TextView with new data BUT there doesn't appear to be
> any way to find out when you have reached either location.  Could some
> one help me out with this?  How can this be done?
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to determine when a ScrollView has reached the bottom

2009-04-08 Thread for android
Not sure about ur use-case...You might want to do that...

But if you want to do something when the scroll position has changed then
onScrollChanged is your friend

On Thu, Apr 9, 2009 at 11:08 AM, nwmotog...@gmail.com
wrote:

>
> so you are suggesting that I create a custom ScrollView?
>
> On Apr 8, 10:33 pm, for android  wrote:
> > View.onScrollChanged
> >
> > On Thu, Apr 9, 2009 at 10:53 AM, nwmotog...@gmail.com
> > wrote:
> >
> >
> >
> >
> >
> > > I have a TextView inside a ScrollView and I have loaded it with a
> > > bunch of text.  When the ScrollView gets to the bottom/top I would
> > > like to load the TextView with new data BUT there doesn't appear to be
> > > any way to find out when you have reached either location.  Could some
> > > one help me out with this?  How can this be done?
> >
>

--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to determine when a ScrollView has reached the bottom

2009-04-08 Thread nwmotog...@gmail.com

so you are suggesting that I create a custom ScrollView?

On Apr 8, 10:33 pm, for android  wrote:
> View.onScrollChanged
>
> On Thu, Apr 9, 2009 at 10:53 AM, nwmotog...@gmail.com
> wrote:
>
>
>
>
>
> > I have a TextView inside a ScrollView and I have loaded it with a
> > bunch of text.  When the ScrollView gets to the bottom/top I would
> > like to load the TextView with new data BUT there doesn't appear to be
> > any way to find out when you have reached either location.  Could some
> > one help me out with this?  How can this be done?
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to determine when a ScrollView has reached the bottom

2009-04-08 Thread for android
View.onScrollChanged

On Thu, Apr 9, 2009 at 10:53 AM, nwmotog...@gmail.com
wrote:

>
> I have a TextView inside a ScrollView and I have loaded it with a
> bunch of text.  When the ScrollView gets to the bottom/top I would
> like to load the TextView with new data BUT there doesn't appear to be
> any way to find out when you have reached either location.  Could some
> one help me out with this?  How can this be done?
> >
>

--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---