Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't register click when user moves away from Button before lifting finger #15

Merged
merged 2 commits into from
Jan 6, 2018

Conversation

Seylox
Copy link
Contributor

@Seylox Seylox commented Nov 22, 2017

No description provided.

@Lissy93
Copy link
Contributor

Lissy93 commented Dec 17, 2017

+1 this PR. @StevenDXC any chance of a code review and merge?

@Seylox
Copy link
Contributor Author

Seylox commented Dec 17, 2017

@Lissy93 if you want to use it with the Changes of the PR you can use it as a dependency from my Repo using Jitpack.io: https://jitpack.io/#Seylox/dxloadingbutton

@leoFengCT
Copy link

Touch Event did not add ACTION_CANCEL. It is not work well if touch and then move

public boolean onTouchEvent(MotionEvent event) {
if(!isEnabled()){
return true;
}
Log.i("AAA","Action="+event.getAction()) ;
switch (event.getAction()){
case MotionEvent.ACTION_DOWN:
mTouchX = event.getX();
mTouchY = event.getY();
playRippleAnimation(true,false);
break;
case MotionEvent.ACTION_UP:
playRippleAnimation(false,false);
break;
case MotionEvent.ACTION_CANCEL:
playRippleAnimation(false,true);
break;
}

    return true;
}

@StevenDXC StevenDXC merged commit abb2deb into StevenDXC:master Jan 6, 2018
@StevenDXC
Copy link
Owner

thanks, has merged @Seylox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants