Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有动态添加数据的列表视图。单击按钮时,它会转到另一个活动并出现列表视图。我希望它在单击按钮时显示列表视图的最后一个元素?怎么做?
您可以通过执行以下操作滚动到列表视图的底部:
listView.setSelection(listAdapter.getCount() - 1);