Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

scroll view height

Hi,

I'm trying to build a web view and inject it in a scroll view. Since the text filled in the Web View is dynamic its impossible to know the exact height.
What happens is that when i reach the bottom of the view the web view is cut and I cant neither scroll it to see the content.
I haven't specified any height dimension on both views, since i thought it was the way to auto size them.
Is there a workaround for this?

Thanks

— asked March 16th 2010 by Daniele Sangalli
  • autosize
  • height
  • scrollview
1 Comment
  • I had to set height & width of the content I added to the scrollview. See my comment here.

    — commented April 4th 2011 by Joe iEntry

2 Answers

  • you should be able to specify height:'auto' on the web view. we have fixed some bugs around this in head. we are planning a point release on Monday or you can build from head.

    — answered March 16th 2010 by Nolan Wright
    permalink
    2 Comments
    • Still the height:'auto' dont work for the local files.

      — commented October 17th 2010 by Raquibul Islam
    • Yea, I had to set the height and width, see my comment here.

      — commented April 5th 2011 by Joe iEntry
  • Hi,
    I went into a similar situation today. After some testing and investigation, I could solve the issue by using "vertical layouts".
    Create a scrollview and make its layout=vertical. Then add different views into it. In these views you have whatever UI elements containing your dynamic text.
    For these different views, the "top" property will be then relevant to the view preceding it, and not to the whole layout. No need to set the height since it will default to 'auto'.

    I hope this will help.

    Regards,
    Mohamad

    — answered September 9th 2011 by Mohamad Nabulsi
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.