MagicButton

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. 


alt tag 

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>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值