ScrollView滚动条,这个很简单,滚动条也分为横向和纵向
HorizontalScrollView,这个当然就是横向的滚动条
使用ScrollView我们只要把它加到需要滚动的组件外面就可以了
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout>
...
</LinearLayout>
</ScrollView>
要注意ScrollView里面只能包含一个组件,多个组件我们就在外面包一个LinearLayout,不要用ScrollView
直接包裹多个控件或布局
HorizontalScrollView,这个当然就是横向的滚动条
使用ScrollView我们只要把它加到需要滚动的组件外面就可以了
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout>
...
</LinearLayout>
</ScrollView>
要注意ScrollView里面只能包含一个组件,多个组件我们就在外面包一个LinearLayout,不要用ScrollView
直接包裹多个控件或布局