scrollView的fillviewport
16lz
2021-12-04
Romain Guy write a little info about a ScrollView attribute that ismissingfrom documentation : android:fillViewport=”true” .
It must be set to ScrollView and has thefollowingefect : when set to true, this attribute causes the scroll view’s child to expand to the height of theScrollView
if needed. When the child is taller than theScrollView
, the attribute has no effect.
当你想让一个高度值不足scrollview的子控件fillparent的时候,单独的定义android:layout_height="fill_parent"是不起作用的,必须加上fillviewport属性,当子控件的高度值大于scrollview的高度时,这个标签就没有任何意义了。
更多相关文章
- Android学习--Android带删除按钮的ListView
- Android/Linux大于1024Bytes打印
- Android(安卓)ListView 控件学习
- Android(安卓)遍历ListView条目控件
- Android的帧布局
- Android(安卓)UI控件详解-Button(按钮)点击事件的5种写法
- android水平循环滚动控件
- android 获取屏幕高度和宽度
- android URL获取图片显示到ImageView 控件上