是否可以从底部填充 ListView? [英] Is it possible to make a ListView populate from the bottom?

查看:22
本文介绍了是否可以从底部填充 ListView?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的应用程序,它基本上由一行按钮和一个要选择和操作的项目的 ListView 组成.列表中可能只有一项或几项.但是,我更希望列表从 ListView 的底部填充,因为大多数人拿着手机的方式可以更轻松地选择靠近屏幕底部的项目.这可能吗?

I have a simple application which basically consists of a line of buttons and a ListView of items to be selected and manipulated. There might be only one item in the list or a few. However, I would prefer if the list would populate from the bottom of the ListView, since the way most people hold their phones makes it easier to select items closer to the bottom of the screen. Is this possible?

推荐答案

您可以使用一个简单的 XML 属性让 ListView 自下而上堆叠其项目在 xml 下 -

You can have the ListView stack its items from the bottom up using a simple XML property under the xml -

<ListView 
    android:stackFromBottom="true"
...
></ListView>

请阅读@The Berga 的回答,否则这将不起作用.

Please read @The Berga answer to otherwise this won't work.

这篇关于是否可以从底部填充 ListView?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆