Good hint. I was able to do int h1 = computeVerticalScrollExtent(); int h3 = computeVerticalScrollRange();
if (h1 == h3) { //switch to linearlayout wrapper } inside a ScrollView wrapper. The above methods return the same thing on a LinearLayout though (and probably also on regular Views), so at first the trick needs assuming that the wrapped View needs a scrollbar and then see if it really needs one. Thanks! On May 5, 6:41 pm, Dianne Hackborn <hack...@android.com> wrote: > The only thing View knows is these methods it calls on itself to have > subclasses tell it how to show the scroll bars: > > http://developer.android.com/reference/android/view/View.html#compute...() > > Beyond that, you will need to look at a specific class that is doing > scrolling. > > > > > > > > > > On Thu, May 5, 2011 at 8:09 AM, kellogs <mihai0...@gmail.com> wrote: > > Hello, > > > trying to implement a dynamic scrolview wrapping mechanism here. But > > no matter what method I try from the View class they all return me the > > view's part of height that is currently visible on screen. So if there > > are 360 pixels available for a textview that has lots of text and is > > currently using 400 pixels its getHeight() and many other related > > methods always report 360. > > > Any way around this ? maybe getting to the View's Canvas ? How can I > > go about that ? > > > Thank you! > > > -- > > 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 > > -- > Dianne Hackborn > Android framework engineer > hack...@android.com > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them. -- 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