Android7.0中文文档(API) -- ScrollView
来源:互联网 发布:oracle数据库备份命令 编辑:程序博客网 时间:2024/06/05 21:17
完整内容,请查看:http://www.zhdoc.net/android/reference/android/widget/ScrollView.html
ScrollView
public class ScrollView
extendsFrameLayout
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 a LinearLayout
in a vertical orientation, presenting a vertical array of top-level items that the user can scroll through.
视图层次结构的布局容器,可以由用户进行滚动,允许它的内容比物理显示屏更大。ScrollView是一个FrameLayout
,这意味着你应该在其中放置一个子项来滚动,其包含了所有的内容;这个子项本身可能是一个具有复杂的对象层次结构的布局管理器。子项经常在垂直方位中,使用一个LinearLayout
,其呈现了一个顶层项的垂直排列,用户可以滚动浏览。
You should never use a ScrollView with a ListView
, because ListView takes care of its own vertical scrolling. Most importantly, doing this defeats all of the important optimizations in ListView for dealing with large lists, since it effectively forces the ListView to display its entire list of items to fill up the infinite container supplied by ScrollView.
你不能将ScrollView和ListView
一起使用,因为ListView负责自己的垂直滚动操作。最重要的是,这样做会破坏ListView中为处理大型列表所有重要的优化,因为它有效地迫使ListView显示它的整个列表,以填充由ScrollView提供的无限容器。
The TextView
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. TextView
类也负责它自己的滚动,因此不需要ScrollView,但是同时使用,可以实现在较大容器中的显示文本视图的效果。
ScrollView only supports vertical scrolling. For horizontal scrolling, use HorizontalScrollView
.
ScrollView仅支持垂直滚动。关于水平滚动,请使用HorizontalScrollView
。
摘要
XML属性
android:fillViewport
设置scrollview是否应拉伸其内容以填充可视区域。 继承XML属性
android.widget.FrameLayout
android.view.ViewGroup
android.view.View
继承常量
android.view.ViewGroup
android.view.View
继承字段
android.view.View
Public构造方法
ScrollView(Context context)
ScrollView(Context context, AttributeSet attrs)
ScrollView(Context context, AttributeSet attrs, int defStyleAttr)
ScrollView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
Public方法
完整内容,请查看:http://www.zhdoc.net/android/reference/android/widget/ScrollView.html
- Android7.0中文文档(API) -- ScrollView
- Android7.0中文文档(API)--- FrameLayout
- Android7.0中文文档(API)--- DatePicker
- Android7.0中文文档(API) --- MediaController
- Android7.0中文文档(API)--- TabHost
- Android7.0中文文档(API) -- TimePicker
- Android7.0中文文档(API)-- ViewAnimator
- Android7.0中文文档(API)--- AbsoluteLayout
- Android7.0中文文档(API) -- Switch
- Android7.0中文文档(API) --- ToggleButton
- Android7.0中文文档(API) --- RadioButton
- Android7.0中文文档(API) --- CheckedTextView
- Android7.0中文文档(API)-- DigitalClock
- Android7.0中文文档(API)-- TextClock
- Android7.0中文文档(API)---Chronometer
- Android7.0中文文档(API)--- AdapterView
- Android7.0中文文档(API)--- AdapterViewAnimator
- Android7.0中文文档(API)--- DialerFilter
- D 01_提交表单注意事项
- yum学习
- bzoj1799: [Ahoi2009]self 同类分布
- 统计一个目录下所有普通文件的个数(包含子目录下的普通文件).
- Python数据分析入门知识点总结
- Android7.0中文文档(API) -- ScrollView
- 异常的处理方式
- 专题一关键字的剖析----7.enum,typedef的分析
- 【HTML5学习笔记】14:全局属性和其它
- 第一个jenkins构建作业
- Tensorflow一些常用基本概念与函数(二)
- C和汇编的双向调用以及一些问题
- 负载均衡算法的理解
- 日常训练 20170612 钥匙