我有一个可以包含任意数量的项目一个ListView。当它使用小于我想显示页脚填充在剩余空间中的屏幕的整个高度。
I have a ListView which can contain any number of items. When it uses less than the whole height of the screen I want to show a footer which fills the remaining space.
页脚只是一个平铺图像。我不能只将其设置为在ListView或其容器的背景,因为列表项目是部分透明的,并且它必须是主要的背景,而不是页脚可见通过他们
The footer is just a tiled image. I can't just set it as the background of the ListView or its container, because the list items are partially transparent and it must be the main background and not the footer visible through them.
添加页脚视图工作正常,如果页脚是一个固定的高度,但是如果固定高度大于剩余高度,然后在ListView滚动不必要地
Adding the footer view works fine if the footer is of a fixed height, but if the fixed height is more than the remaining height then the ListView scrolls unnecessarily.
制作页脚视图FILL_PARENT似乎没有任何影响,它只是不可见的。
Making the footer view fill_parent seems to have no effect, it's just invisible.
把页脚视图到父布局上也没有任何影响,因为ListView中似乎充满了整个高度,除非它给了一个固定的layout_height值。
Putting the footer view into the parent layout also has no effect, because the ListView seems to fill the whole height unless it's given a fixed layout_height value.
这可能吗?
推荐答案尝试布局权重设置一个或退房手续试图合并的看法: 的android-developers.blogspot/2009/03/android-layout-tricks-3-optimize-by.html
Try setting the layout weight to one, or check out trying a merge view: android-developers.blogspot/2009/03/android-layout-tricks-3-optimize-by.html
更多推荐
我怎样才能让一个ListView舒展开来填补剩余空间的页脚?
发布评论