简体   繁体   中英

scroll view issue Android

我以编程方式添加布局。当我在滚动视图中添加列表视图时,我已经添加了一个滚动视图作为父布局以及水平和垂直线性布局的组合,但我遇到了一个问题,尽管列表视图的高度是设置为填充parent。在底部添加一个空白,并且listview的高度变得很小。我没有找到发生这种情况的原因,这是android中用于scrollview的错误吗?

fill_parent won't work. Try setting android:fillViewport="true" .

Without any code, I'd have to take a guess and say that your ScrollView is not set to fill_parent.

Try using layout editor in Eclipse or the hierachyviewer that ships with the Android SDK to examine your layout in the emulator and see which view is not filling the screen.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM