tags:

views:

2896

answers:

1

Hi,

I created a user form which fits the window in vertical orientation. When the user slides the keyboard the form doesn't fit the screen (horizontal orientation). I tried to add the scrollbar but it is not visible.

I would appreciate if anyone could show how to modify the following layout file in order to display scrollbar when the orientation is set to horizontal.

Thanks!

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_height="wrap_content"
    android:layout_width="fill_parent" 
    android:orientation="vertical" 
    android:scrollbars="vertical" 
    android:scrollbarAlwaysDrawVerticalTrack="true">
        ...
    </LinearLayout>
+7  A: 

Remove the scrollbar attributes and wrap the whole thing in a ScrollView.

CommonsWare