Reputation: 2600
For some reason I can't horizontally scroll through my linear layout...
I tried this solution and it didn't work: LinearLayout not expanding inside a ScrollView
Is there something else that I'm missing?
Here is my code:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fadingEdge="horizontal"
android:scrollbars="horizontal"
android:fillViewport="true" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
android:scrollbarStyle="insideOverlay"
android:scrollbars="horizontal" >
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/ventuscartoon" >
</ImageButton>
<ImageButton
android:id="@+id/imageButton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/eincartoon" />
<ImageButton
android:id="@+id/imageButton3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ventuscartoon" />
<ImageButton
android:id="@+id/imageButton2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ventuscartoon" />
</LinearLayout>
</ScrollView>
Thanks!
Upvotes: 0
Views: 1145
Reputation: 239
If you want to scroll horizontally you should probably use HorizontalScrollView instead of ScrollView
Upvotes: 4