ScrollView中布局显示两个元素,一个标签切换,一个viewpager,布局如下:
这里需要将scrollview中fillviewport设置为true,并将layout_height设置为match_parent才能使viewpager不会留出空白。如果没有fillviewport属性,在linearlayout中设置layout_height为match_parent是无效的!
本文共 316 字,大约阅读时间需要 1 分钟。
ScrollView中布局显示两个元素,一个标签切换,一个viewpager,布局如下:
这里需要将scrollview中fillviewport设置为true,并将layout_height设置为match_parent才能使viewpager不会留出空白。如果没有fillviewport属性,在linearlayout中设置layout_height为match_parent是无效的!
转载于:https://my.oschina.net/buobao/blog/611296