Array
(
    [0] => WP_Term Object
        (
            [term_id] => 21
            [name] => Android
            [slug] => android
            [term_group] => 0
            [term_taxonomy_id] => 21
            [taxonomy] => category
            [description] => 
            [parent] => 0
            [count] => 104
            [filter] => raw
            [cat_ID] => 21
            [category_count] => 104
            [category_description] => 
            [cat_name] => Android
            [category_nicename] => android
            [category_parent] => 0
        )

    [1] => WP_Term Object
        (
            [term_id] => 22
            [name] => Android Library
            [slug] => android-library
            [term_group] => 0
            [term_taxonomy_id] => 22
            [taxonomy] => category
            [description] => 
            [parent] => 0
            [count] => 69
            [filter] => raw
            [cat_ID] => 22
            [category_count] => 69
            [category_description] => 
            [cat_name] => Android Library
            [category_nicename] => android-library
            [category_parent] => 0
        )

    [2] => WP_Term Object
        (
            [term_id] => 84
            [name] => Android Source Code
            [slug] => android-source-code
            [term_group] => 0
            [term_taxonomy_id] => 84
            [taxonomy] => category
            [description] => 
            [parent] => 0
            [count] => 40
            [filter] => raw
            [cat_ID] => 84
            [category_count] => 40
            [category_description] => 
            [cat_name] => Android Source Code
            [category_nicename] => android-source-code
            [category_parent] => 0
        )

    [3] => WP_Term Object
        (
            [term_id] => 20
            [name] => Fun Stuff
            [slug] => fun-stuff
            [term_group] => 0
            [term_taxonomy_id] => 20
            [taxonomy] => category
            [description] => All of this articles are totally enjoyable and you can take a rest from your daily work to read some funny stuffs.
            [parent] => 0
            [count] => 33
            [filter] => raw
            [cat_ID] => 20
            [category_count] => 33
            [category_description] => All of this articles are totally enjoyable and you can take a rest from your daily work to read some funny stuffs.
            [cat_name] => Fun Stuff
            [category_nicename] => fun-stuff
            [category_parent] => 0
        )

)
///////////

How to morph Android button

0
113
How to morph Android button library
How to morph Android button library

In my previous article on ChipView and ChipsInput i am going to show you how to morph Android button. In this library you’ll use Android button which can morph from one shape to another.

You can easily extend MorphingButton to add your own behaviour. Below is example of LinearProgressButton which extends MorphingButton.

morph Android button library
morph Android button library

How to implement morph Android button library

The lib is available on https://jitpack.io.

repositories {
    jcenter()
    maven { url "https://jitpack.io" }
}

dependencies {
    compile 'com.github.dmytrodanylyk:android-morphing-button:98a4986e56' // commit hash
}

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);

That’s it yes you need to do only that thing. Hmm thats cool isn’t it?

Tell us with you suggestion about this library in comment section.

 

Share your thoughts

Loading Facebook Comments ...
Loading Disqus Comments ...