scrollView的fillviewport
16lz
2021-01-23
Romain Guy write a little info about a ScrollView attribute that is missing from documentation : android:fillViewport=”true” .
It must be set to ScrollView and has the following efect : when set to true, this attribute causes the scroll view’s child to expand to the height of the ScrollView
if needed. When the child is taller than the ScrollView
, the attribute has no effect.
当你想让一个高度值不足scrollview的子控件fillparent的时候,单独的定义android:layout_height="fill_parent"是不起作用的,必须加上fillviewport属性,当子控件的高度值大于scrollview的高度时,这个标签就没有任何意义了。
更多相关文章
- android 获取界面上所有控件
- Android开发——控件基础(七)ListView组件:示例代码
- android获得屏幕高度和宽度
- Android 中 EditText 的 inputType 属性及其他常用属性详解
- Android实现圆形头像-使用自定义控件
- Android studio gradle 生成字段属性值
- Android 获取View高度宽度
- android -布局控件禁用多点触控
- 在AndroidManifest.xml文件中的android:windowSoftInputMode属性