Skip to content

when you click continuously (before the transition animation ends) on the next image it crashes  #2

@hussam789

Description

@hussam789
 @Override
public boolean onTouchEvent(MotionEvent event) {
    switch (event.getAction()) {
    case MotionEvent.ACTION_DOWN:
        mIsSingleTap = event.getPointerCount() == 1;
        final int index = mSelectedCoverView.getNumber();
        if (mIsSingleTap) {
            mStartX = event.getX(0);
            int lowest,highest;

            try {

                lowest = mTouchedCovers.first();
                highest = mTouchedCovers.last();
            } catch (Exception e) {
                return true;
            }
                             .

mTouchedCovers.first() throws exception on this case, you have to ignore this touch and wait to the animation to finish so i returned true and exist the method

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions