Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dmytrodanylyk/android-morphing-button
Android Morphing Button
https://github.com/dmytrodanylyk/android-morphing-button
Last synced: 3 days ago
JSON representation
Android Morphing Button
- Host: GitHub
- URL: https://github.com/dmytrodanylyk/android-morphing-button
- Owner: dmytrodanylyk
- Created: 2015-09-10T17:08:29.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-04-15T11:14:33.000Z (7 months ago)
- Last Synced: 2024-04-16T12:04:46.465Z (7 months ago)
- Language: Java
- Size: 503 KB
- Stars: 1,427
- Watchers: 37
- Forks: 218
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- made-in-ukraine - android-morphing-button
README
[![](https://jitpack.io/v/dmytrodanylyk/android-morphing-button.svg)](https://jitpack.io/#dmytrodanylyk/android-morphing-button)
## Description [Android morphing button]### Description for the android-morphing Button
Android button which can morph from one shape to another, also with the feature of changing color.
You can easily extend `MorphingButton` to add your own behaviour. Below is example of `LinearProgressButton` which extends `MorphingButton`.
### Sample code:-
```java
// sample demonstrate how to morph button to green circle with icon
MorphingButton btnMorph = (MorphingButton) findViewById(R.id.btnMorph);
// inside on click event
MorphingButton.Params circle = MorphingButton.Params.create()
.duration(500)
.cornerRadius(dimen(R.dimen.mb_height_56)) // 56 dp
.width(dimen(R.dimen.mb_height_56)) // 56 dp
.height(dimen(R.dimen.mb_height_56)) // 56 dp
.color(color(R.color.green)) // normal state color
.colorPressed(color(R.color.green_dark)) // pressed state color
.icon(R.drawable.ic_done); // icon
btnMorph.morph(circle);
```### Wikipedia:-
- Home // TODO
- User Guide // TODO### Integration:-
The lib is available on https://jitpack.io.
```groovy
repositories {
jcenter()
maven { url "https://jitpack.io" }
}dependencies {
compile 'com.github.dmytrodanylyk:android-morphing-button:1.0'
}
```### License
```
The MIT License (MIT)Copyright (c) 2016 Danylyk Dmytro
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.
```