Android listView偵測現在滑到什麼位置

希望 ListView 捲動時




private OnScrollListener listScrollListener = new ListView.OnScrollListener(){
public void onScroll(AbsListView arg0,
int firstVisibleItem, int visibleItemCount, int totalItemCount) {
if (totalItemCount <= 0){ return; } if (firstVisibleItem == 0) { //目前第一列還在畫面上 } else { //第一列已經消失在畫面上,在這執行要做的動作 } if (firstVisibleItem + visibleItemCount >= totalItemCount){

public void onScrollStateChanged(AbsListView view, int scrollState) {

標籤: ,

About: Kaito

One thought on “Android listView偵測現在滑到什麼位置”

  1. Of those who have gone elsewhere to get a charge card, an increased proportion happen to be with their chosen provider with an extended period.

    But if you need to reduce your likelihood of failure and make money faster, I’ll choose
    to be an innovator. Your scores don’t stop talking about your character and the way others perceive you being a person.


發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

這個網站採用 Akismet 服務減少垃圾留言。進一步瞭解 Akismet 如何處理網站訪客的留言資料