kakajika / SwipeAwayDialog
- четверг, 5 мая 2016 г. в 03:13:59
Java
DialogFragment swipeable away like Tinder UI.
Android DialogFragment that enables Dialog to be swiped away to dismiss.
It's extremely easy to make Tinder-like UI.
dependencies {
compile 'com.labo.kaji:swipeawaydialog:0.1.0'
}Just extend SwipeAwayDialogFragment instead of DialogFragment.
public class ExampleDialogFragment extends SwipeAwayDialogFragment {
// Implement DialogFragment as usual.
}If you want to handle swiped away event, implement onSwipedAway.
You can prevent dismissing by returning true.
@Override
public boolean onSwipedAway(boolean toRight) {
return false;
}MIT License.