0

何らかの理由で、線形レイアウトを水平方向にスクロールできません...

このソリューションを試しましたが、機能しませんでした:LinearLayoutがScrollView内で展開されません

私が見逃しているものは他にありますか?

これが私のコードです:

<?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>

ありがとう!

4

1 に答える 1

4

水平方向にスクロールする場合は、おそらくScrollViewの代わりにHorizo​​ntalScrollViewを使用する必要があります

于 2012-09-16T19:51:47.737 に答える