ScrollView
http://developer.android.com/reference/android/widget/ScrollView.html
Class Overview
Layout container for a view hierarchy that can be scrolled by the user, allowing it to be larger than the physical display. A ScrollView is aFrameLayout
, meaning you should place one child in it containing the entire contents to scroll; this child may itself be a layout manager with a complex hierarchy of objects. A child that is often used is aLinearLayout
in a vertical orientation, presenting a vertical array of top-level items that the user can scroll through.
TheTextView
class also takes care of its own scrolling, so does not require a ScrollView, but using the two together is possible to achieve the effect of a text view within a larger container.
ScrollView only supports vertical scrolling.
类概述
布局容器视图层次结构,用户可以滚动,允许它大于实物展示。一个滚动是一个FrameLayout
,这意味着你应该把它包含的全部内容滚动一个child,这个child本身可能是一个复杂的对象层次结构的布局管理器。经常使用的一个孩子是一个
LinearLayout在垂直方向,呈现出顶级的项目,用户可以通过滚动的垂直排列。
TextView的
类别也需要照顾自己的滚动,所以不需要滚动,但使用两个在一起是有可能实现一个更大的容器内文本视图的效果。
滚动仅支持垂直滚动。
请注意:只能有一个View在其根
更多相关文章
- ConstraintLayout实现左中右布局
- StickyScrollView解说
- Android(安卓)高仿QQ 登陆界面
- 自定义布局-自定义RelativeLayout
- Android布局颜色对应值
- DrawerLayout中加入多个View
- Android(安卓)线性布局 LinearLayout
- ConstraintLayout约束布局属性
- [置顶] Android实用视图动画及工具系列之六:通用表情栏,仿QQ微信聊