0

I have two events 1. list view onScroll and 2. list's child view click listener.

while clicking on listview child item onscroll method is calling.

Please suggest How to stop on scroll while clicking on the listview child item?

@Override
        public void onScroll(AbsListView view, int firstVisibleItem,
                             int visibleItemCount, int totalItemCount) {

        }

holder.mScheduleView.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {

        }
    });

Note : This is only happening when i have two or 3 data in the list

Mahi
  • 1,754
  • 2
  • 16
  • 37
  • Check out [this answer](https://stackoverflow.com/a/9665566/5523312) to a similar question. Might be helpful. – Arun May 21 '19 at 09:44
  • @Arun I have some login inside onScroll method so I will be not able to user onScrollStateChanged method. – Mahi May 21 '19 at 09:49
  • I am not sure if onScroll being called can be fixed. So if you are not using firstVisibleItem, visibleItemCount or totalItemCount for your login, then you can probably shift your login code to onScrollStateChanged. onScrollStateChanged will return the SCROLL_STATE which you can use to determine if user is actually scrolling or if it was triggered by click event. – Arun May 21 '19 at 13:05

0 Answers0