An open API service indexing awesome lists of open source software.

https://github.com/kakajika/SwipeAwayDialog

DialogFragment swipeable away like Tinder UI.
https://github.com/kakajika/SwipeAwayDialog

Last synced: 1 day ago
JSON representation

DialogFragment swipeable away like Tinder UI.

Awesome Lists containing this project

README

        

# SwipeAwayDialog

[![Platform](https://img.shields.io/badge/platform-android-green.svg)](http://developer.android.com/index.html)

[![API](https://img.shields.io/badge/API-12%2B-yellow.svg?style=flat)](https://android-arsenal.com/api?level=12)
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-SwipeAwayDialog-green.svg?style=true)](http://android-arsenal.com/details/1/3519)
[![Build Status](https://travis-ci.org/kakajika/SwipeAwayDialog.svg?branch=master)](https://travis-ci.org/kakajika/SwipeAwayDialog)

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

![](https://raw.githubusercontent.com/wiki/kakajika/SwipeAwayDialog/images/octocats.gif)

![](https://raw.githubusercontent.com/wiki/kakajika/SwipeAwayDialog/images/dialogs.gif)

## Install

```groovy
dependencies {
compile 'com.labo.kaji:swipeawaydialog:0.1.1'
}
```

## Usage

Just extend `SwipeAwayDialogFragment` instead of `DialogFragment`.

```java
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.

```java
@Override
public boolean onSwipedAway(boolean toRight) {
return false;
}
```

## License

MIT License.