0
这里后滚动是我的布局:滚动型不添加内容动态
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<ScrollView
android:id="@+id/button_scroll"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:fillViewport="true">
<LinearLayout
android:id="@+id/buttons"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"/>
</ScrollView>
</LinearLayout>
在我的代码,我加入按钮到水平的LinearLayout ID /按钮。一切都很顺利,只是在添加了足够的内容后,它从不滚动。
我想:
- 呼叫了滚动
- 更改为无效的LinearLayout中的layout_width尝试使用HorizontalScrollView为wrap_content
啊啊啊,这么简单...谢谢! – Matthieu