Android Morphing Button

Additional

Language
Java
Version
1.0 (Oct 6, 2021)
Created
Sep 10, 2015
Updated
Mar 14, 2022
Owner
Dmytro Danylyk (dmytrodanylyk)
Contributors
Ravindra Kumar (ravidsrk)
Dmytro Danylyk (dmytrodanylyk)
Maxim (max890)
Hannes Achleitner (hannesa2)
dependabot[bot]
gradle-update-robot
Akshay Sharma (Akshay560408)
Carpten
LOKESH SINGH RAJWAR (LokeshRajwar)
azz-design
10
Activity
Badge
Generate
Download
Source code
APK file

Announcement

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:-

// 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.

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.