listView.setAdapter(adapter);
listView.setOnScrollListener(this);
listView.setOnItemClickListener(this);
I have listView on fragment, custom adapter and I want to set 2 listeners on it, but when I added setOnScrollListener
first listener doesn't work. What's wrong? and how can I fix it?
I had the same problem, which seemed to be caused by a misplaced adapter.notifyDataSetChanged()
call. Removing this line fixed the problem, as it turned out I didn't need it anyway.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.