MagicButton
What is Magic Button?
It's a new button in android that hypnotizes the user and make him give you a lot of money!!!
Ok, just kidding, this is not so magic yet... but it's a cute button.
Ok it's cute, But how can I use
You just need to add this in your layout.
<br.com.bloder.magic.view.MagicButton
android:id="@+id/magic_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:magic_button_size="50dp"
app:button_icon="@drawable/your_icon"
app:button_icon_width="25dp"
app:button_icon_height="25dp"
app:hide_text="Hi Mom!"
app:hide_text_size="15dp"
app:hide_text_color="@android:color/black"
app:icon_button_color="button_icon_color"
app:expandable_area_color="that_expandable_button_part_color"/>
How about click event?
In magic button, the click event will work only in second click and you can set this event with:
magicButton.setMagicButtonClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
yourAction();
}
});
Import
Gradle
dependencies {
compile 'com.github.bloder:magic:1.1'
}
Maven
<dependency>
<groupId>com.github.bloder</groupId>
<artifactId>magic</artifactId>
<version>1.1</version>
<type>pom</type>
</dependency>
Ivy
<dependency org='com.github.bloder' name='magic' rev='1.1'>
<artifact name='$AID' ext='pom'></artifact>
</dependency>