EverythingMe / overscroll-decor

Android: iOS-like over-scrolling effect applicable over almost all scrollable Android views.
BSD 2-Clause "Simplified" License
2.85k stars 400 forks source link

Conflict with ListView onItemClick events #20

Closed zippozeng closed 7 years ago

zippozeng commented 8 years ago

Conflict with ListView onItemClick events

When I click on a item, this event will sometimes turn into a longclick event。

zippozeng commented 8 years ago

sometime,i click item,but the event response onLongItemClick

d4vidi commented 8 years ago

There have been numerous issues with item selections. I'll try looking into it. There's one thing I need to know, though: how do you register your item-click listeners? (please provide code snippets)

zippozeng commented 8 years ago

just like that. `

     mRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {

        @Override
        public void onRefresh() {

            if (mActivity != null) {
                ((MainActivity) mActivity).pullData(false);
            }
        }

    });

    mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {

        @Override
        public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
            LogUtil.d(TAG, "onClickFrontView:" + position);
            Intent intent = new Intent(getActivity(), AddTaskActivity.class);
            intent.putExtra(Constants.EXTRA.TASK, mTaskModels.get(position));
            getActivity().startActivityForResult(intent, MainActivity.REQUEST_ADDTASK);
        }

    });

    mListView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
            @Override
            public boolean onItemLongClick(AdapterView<?> parent, View view, final int position, long id) {
                // ...
                return true;
            }
        });`
d4vidi commented 8 years ago

Cool. Thanks for the info, I'll try my best looking into that real soon!

ribbon-libs commented 8 years ago

Hello guys, Anything news of this issue? And is this project still supported?

Regards

d4vidi commented 7 years ago

Hi! I've made some updates that could get your problem fixed. Would appreciate it if you test the new version 1.0.4 out!

vadol commented 7 years ago

Hi ,In load more listview,last list item not clickable . It is clickable if you double tap on list item if 1 or 2 list item then not clickable list item in single tap.

vadol commented 7 years ago

If use setOnItemLongClickListener then work properly but when over scroll list view performing ItemClickListernere after complete over scroll animation

d4vidi commented 7 years ago

Fixed in 1.0.4.