首页 > 移动平台 > 详细

[Android Pro] ScrollView使用fillViewport设置高度为MatchParent

时间:2016-11-09 22:33:50      阅读:132      评论:0      收藏:0      [点我收藏+]

reference to : http://blog.csdn.net/u012975705/article/details/49275001

之前遇到一问题,就是当使用ScrollView时,ScrollView控件里的布局无法充满整个手机屏幕,通过阅读源码发现,ScrollView中有个mFillViewport属性:

技术分享

When set to true, the scroll view measure its child to make it fill the currently visible area

大概意思就是当mFillViewport设置为true的时候,其子视图能够自动填充满当前可见的整个区域。即,在xml布局文件中为ScrollView控件添加

android:fillViewport="true"
能使ScrollView里的元素填满整个ScrollView。
 

[Android Pro] ScrollView使用fillViewport设置高度为MatchParent

原文:http://www.cnblogs.com/0616--ataozhijia/p/6048418.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!