xmh19936688 / SwipeAwayDialog

(拖拽移除的dialog_带gif)DialogFragment swipeable away like Tinder UI.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SwipeAwayDialog

Platform API Android Arsenal

Android DialogFragment that enables Dialog to be swiped away to dismiss.
It's extremely easy to make Tinder-like UI.

Install

dependencies {
    compile 'com.labo.kaji:swipeawaydialog:0.1.0'
}

Usage

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;
}

License

MIT License.

About

(拖拽移除的dialog_带gif)DialogFragment swipeable away like Tinder UI.

License:MIT License


Languages

Language:Java 100.0%