置顶页脚低于Android的布局的ListView [英] Sticky Footer Below ListView in Android Layout
本文介绍了置顶页脚低于Android的布局的ListView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在ListView的底部放一个广告的布局。我希望它粘在页面的底部和列表视图几乎滚动去后面。
I want to put an ad layout at the bottom of a ListView. I want it to stick to the bottom of the page and the listview almost scrolling going behind it.
这是我和它不工作:
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:longClickable="true" >
</ListView>
<LinearLayout
android:id="@+id/adLayout"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_gravity="center_horizontal" >
</LinearLayout>
这是底部的LinearLayout我只是需要留在底部。我想ListView中去所有的方式向底部。谁能指教?
It is that bottom LinearLayout I need to just stay at bottom. And I want ListView to go all the way to the bottom. Can anyone advise?
推荐答案
更改属性的的ListView
来:
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:longClickable="true" >
</ListView>
编辑:另外,请检查你的作品code的该父布局 LineareLayout
带属性的android:方向=垂直
这篇关于置顶页脚低于Android的布局的ListView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文