Reputation: 1552
when I turn the phone and the screen is rotating I cannot see the whole screen anymore. This is ok but I cannot scroll! Do I have to set some flag or property for scrolling? This is part of my xml...
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:focusable="true"
android:focusableInTouchMode="true"
android:layout_width="fill_parent" android:layout_height="fill_parent" >
<TableLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:stretchColumns="*">
...
</TableLayout>
<TableLayout android:layout_width="fill_parent" android:layout_height="wrap_content"
...
</TableLayout>
</LinearLayout>
Thanks!
Upvotes: 5
Views: 4311
Reputation: 5722
You must know that in order to use an scrollView
, you must put only one component inside (maybe a linearLayout
) .Maybe that's your problem if you are trying to put in more components at that level.
Upvotes: 1
Reputation: 29121
You have to put your complete layout inside a ScrollView
in order for it to scroll.
It scrolls if your layout height is more than the screen height, which happens generally in landscape mode.
In your case put the LinearLayout
inside a ScrollView
, since ScrollView
can only have 1 child.
Upvotes: 6