Scrollview in Android

      5 Comments on Scrollview in Android

I never noticed, or realised how an application’s UI would render when the orientation changed, since most of the time I tested my apps on the emulator. But one fine day, when a friend of mine walked in and asked to change the orientation, I shocked to see that the layouts didn’t fit in the landscape view.
Well, the solution!!!
Wrap your layouts in a parent ScrollView, so that, when the orientation changes, you will be able to at-least scroll and view the whole layout. How the UI looks, is however a different concern.

5 thoughts on “Scrollview in Android

  1. ABhi

    Hi,

    Any idea how i can provide both horizontal and vertical scrolling support to my View (say grid view or Gallery)

    Thanks & Regards,
    Abhishek

    Reply
  2. carlos.maciel

    @Kumar Bibek: Sorry, LinearLayout does not scroll, have you tried it successfully without a ScrollView?

    See here:
    http://groups.google.com/group/android-developers/browse_thread/thread/60bcba56bdb68fd/50f7e60de3fcd705?q=linearlayout+does+not+allow+vertical#50f7e60de3fcd705

    Here:
    http://www.anddev.org/scrolling-t4076.html

    And here:
    http://groups.google.com/group/android-developers/browse_thread/thread/5791448435a84596/f1541b608419f79c?q=linearlayout+does+scroll#f1541b608419f79c

    Att,
    Carlos Maciel

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *