1. Are you ready for the Galaxy S20? Here is everything we know so far!

Scrollview

Discussion in 'Android Development' started by Aayush Kumar, Aug 3, 2017.

  1. Aayush Kumar

    Aayush Kumar Lurker
    Thread Starter

    Hi All,

    I am building an application that consists of scrollview which in turn consists of a linearlayout.But I am seeing that the scrollview gets finished before linearlayout finishes.Mind you fillviewport is set to "true" for scrollview.
    How to achieve the scrollview height equal to linearlayout height.

    Regards,
    Aayush Kumar
     



    1. Download the Forums for Android™ app!


      Download

       
  2. steve

    steve Developer
    Administrator

    Nkhcnugzbxh js
     
  3. Deleted User

    Deleted User Guest

    That clears it up Steve :D
     
    steve likes this.
  4. steve

    steve Developer
    Administrator

    Wow. I must apologize! Funny thing is... I enabled and tested my phone being unlocked while on me... well, I disabled it later that day but I think this was collateral damage lol.
     
  5. steve

    steve Developer
    Administrator

    Lots of weird issues can happen with ScrollViews. Could you post your layout and maybe some code snippets? One thing you could quickly do is try to invalidate the ScrollView which should redraw the children. If you have some complex scenario you may need to getMeasuredHeight() of the LinearLayout and manually set the ScrollView height (but that seems like more effort than you should need if the code is setup correctly.
     
Loading...

Share This Page

Loading...