Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/konifar/fab-transformation

Support Floating Action Button transformation for Android
https://github.com/konifar/fab-transformation

Last synced: 2 days ago
JSON representation

Support Floating Action Button transformation for Android

Awesome Lists containing this project

README

        

[![GitHub license](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://github.com/konifar/fab-transformation/blob/master/LICENSE)
[ ![Download](https://api.bintray.com/packages/konifar/maven/fab-transformation/images/download.svg) ](https://bintray.com/konifar/maven/fab-transformation/_latestVersion)

# Fab Transformation
This library supports Floating Action Button transformation in [Material Design Guideline](https://www.google.com/design/spec/components/buttons-floating-action-button.html).

# Screenshot
![Demo1](art/transform_to_toolbar.gif)
![Demo2](art/transform_to_sheet.gif)

# Sample App

Get it on Google Play

# Installation
Add the dependency (jcenter) to your `build.gradle`.
```groovy
dependencies {
compile 'konifar:fab-transformation:1.0.0'
}
```

# How to use
This is footer toolbar transformation example.

## Layout
1. Put Floating Action Button and transform view in your layout.
2. Wrap transform view in Circular reveal container.

```xml







```

## Java
### Transform fab to other view.
```java

FabTransformation.with(fab)
.transformTo(toolbarFooter);
```

### Transform other view to fab.
```java
FabTransformation.with(fab)
.transformFrom(toolbarFooter);
```

## Options
```java
FabTransformation.with(fab)
.overlay(overlayView)
.duration(500)
.setListener(new FabTransformation.OnTransformListener() {
@Override
public void onStartTransform() {
//
}

@Override
public void onEndTransform() {
//
}
})
.transformFrom(toolbarFooter);
```

# Requirements
Android 2.3+

# Credits
This library use following libraries.
* [CircularReveal](https://github.com/ozodrukh/CircularReveal)
* [NineOldAndroids](https://github.com/JakeWharton/NineOldAndroids)

# Developed By
Yusuke Konishi (konifar) -

# License
```
The MIT License (MIT)

Copyright (c) 2015 Yusuke Konishi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```