scrollView的fillviewport
16lz
2021-12-04
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(安卓)Tool——Hierachy Viewer可视化调试
- Android中自定义控件
- Android无障碍总结
- Android界面布局基本知识简述
- Android开发——控件基础(七)ListView组件:示例代码
- android 获取界面上所有控件
- android获得屏幕高度和宽度
- Android(安卓)中使用自定义字体的方法
- Android实现圆形头像-使用自定义控件