我正在构建一个实现聊天功能的 Android 应用程序。我目前聊天正常。然而,第一条消息出现在 ListView 的顶部,我想让聊天从下到上增长,而不是从上到下增长。这可以吗?我知道 Periscope 和 Meerkat 等应用程序都可以执行此操作,但我不确定它是否使用 ListView
最佳答案
设置listView.setStackFromBottom(true);为您的 ListView 。
From the doc :公共(public)无效setStackFromBottom( boolean stackFromBottom)
When stack from bottom is set to true, the list fills its content starting from the bottom of the view
关于java - 首先将 ListView 项目添加到列表底部,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29831074/