本文整理了Java中android.widget.ListView.smoothScrollToPositionFromTop()
方法的一些代码示例,展示了ListView.smoothScrollToPositionFromTop()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ListView.smoothScrollToPositionFromTop()
方法的具体详情如下:
包路径:android.widget.ListView
类名称:ListView
方法名:smoothScrollToPositionFromTop
暂无
代码示例来源:origin: Ramotion/direct-select-android
@Override
public void run() {
listView.smoothScrollToPositionFromTop(firstVisibleItem, 0, subScrollDuration);
hideListView();
}
}, 0);
代码示例来源:origin: lordi/tickmate
public void scrollToLatest() {
int scrollposition = (isTodayAtTop) ? 0 : this.count - 1;
((ListActivity) context).getListView().smoothScrollToPositionFromTop(scrollposition, 1, 0);
}
代码示例来源:origin: sismics/reader
@Override
public void onPageSelected(int position) {
// We reached the latest page, load more articles if needed
if (position + 1 >= sharedAdapterHelper.getArticleItems().size()) {
sharedAdapterHelper.load(ArticleActivity.this);
}
// Store article id to mark as read later
final JSONObject article = sharedAdapterHelper.getArticleItems().get(position);
String articleId = article.optString("id");
if (!readArticleIdSet.contains(articleId) && !article.optBoolean("force_unread")) {
readArticleIdSet.add(article.optString("id"));
}
// Scroll the ListView
if (drawerLayout == null) {
if (drawerList.getCheckedItemCount() == 0) {
// Don't be smooth when the activity has just opened
drawerList.setSelectionFromTop(position, 100);
} else {
drawerList.smoothScrollToPositionFromTop(position, 100);
}
drawerList.setItemChecked(position, true);
}
// Update the action bar
updateActionBar();
}
代码示例来源:origin: stackoverflow.com
list.smoothScrollToPositionFromTop(list.getLastVisiblePosition() + 1, 0, 10000);
try {
内容来源于网络,如有侵权,请联系作者删除!