如何製作水平滾動的線性佈局?我只是在myscrollview中包裝一個線性佈局,我也在我的XML文件中做了需要的東西,但它仍然無法水平滾動超過線性佈局大小的內容。下面是我的XML: 製作水平滾動的線性佈局
<ScrollView
android:id="@+id/scroller"
android:layout_marginTop="16dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/popup"
android:fadingEdgeLength="5dip"
android:scrollbars="horizontal"
android:overScrollMode="always"
android:isScrollContainer="true"
android:scrollbarAlwaysDrawHorizontalTrack="true"
>
<LinearLayout
android:id="@+id/tracks"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="1"
android:padding="10dip"/>
</ScrollView >
<ImageView
android:id="@+id/arrow_up"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/arrow_up" />
<ImageView
android:id="@+id/arrow_down"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/scroller"
android:layout_marginTop="-4dip"
android:src="@drawable/arrow_down" />
</RelativeLayout>
檢查答案我已經編輯的地方.. – shassss
具有u看到編輯programmm u有添加xml文件和類檢查一次.... – shassss