是否可以将ListView项目插入列表顶部,并且最近的项目位置在顶部?我知道实现此目的的其他方法,例如items.add(0, item);
,getItem(getCount() - position - 1);
以及在runnble()
内使用listView.smoothScrollToPosition(0);
,但结果为as shows in this image,其中数字表示int position
索引。添加到列表中的新项目放置在底部,向上推动所有以前的项目。将项目动态添加到列表视图顶部
我想结果提前like this?
感谢。
只是颠倒了名单。 –
顶部还是底部? – injecteer