Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/konifar/fab-transformation
- Owner: konifar
- License: mit
- Created: 2015-08-01T08:01:09.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-02T01:46:06.000Z (almost 8 years ago)
- Last Synced: 2024-11-11T00:42:32.270Z (9 days ago)
- Language: Java
- Homepage:
- Size: 650 KB
- Stars: 768
- Watchers: 19
- Forks: 118
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-android-ui - https://github.com/konifar/fab-transformation
- awesome-android-ui - https://github.com/konifar/fab-transformation
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)# 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.
```javaFabTransformation.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.
```