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

Add SwipeDismissBehavior event binding #161

Merged

Conversation

xfumihiro
Copy link
Contributor

Refs #57.

throw new AssertionError("The view is not in a Coordinator Layout.");
}
final SwipeDismissBehavior behavior =
(SwipeDismissBehavior) ((CoordinatorLayout.LayoutParams) view.getLayoutParams()).getBehavior();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should do an instanceof as well and throw a nice message.

return Observable.create(new SwipeDismissBehaviorOnSubscribe(view));
}

private RxSwipeDismissBehavior() { throw new AssertionError("No instances."); }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a huge fan of shoving this on to one line because everything else uses multiple lines.

JakeWharton added a commit that referenced this pull request Oct 7, 2015
@JakeWharton JakeWharton merged commit ab9f55d into JakeWharton:master Oct 7, 2015
@JakeWharton JakeWharton mentioned this pull request Oct 22, 2015
4 tasks
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

2 participants