Android之ScrollView設置了高度(android:layout_height="match_parent")但裏面的組件不能充滿問題

1 問題

寫了ScrollView控件,設置了高度(android:layout_height="match_parent"),但是裏面的組件不能填充它,感覺就像ScrollView高度設置成了wrap_content

 

 

 

2 解決辦法

在ScrollView裏面添加如下屬性即可

android:fillViewport="true"

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章