android登录按钮样式,Android按钮样式(dmytrodanylyk)使用

1.添加依赖

dependencies {

compile ‘com.github.dmytrodanylyk.android-process-button:library:1.0.4’

}

项目地址

https://github.com/dmytrodanylyk/android-process-button

2.Action Process Button

操作指南

https://github.com/dmytrodanylyk/android-process-button/wiki/User-Guide#action-process-button

xml布局:

custom:pb_colorComplete="@color/green_complete"会报错的话参考

xmlns:custom=“http://schemas.android.com/apk/res-auto”

例如:

custom:pb_colorComplete

custom:pb_textComplete

custom:pb_colorProgress

custom:pb_textProgress

custom:pb_textError="Error"

custom:pb_colorComplete

通过Java代码控制它

ActionProcessButton btnSignIn = (ActionProcessButton) findViewById(R.id.btnSignIn);

btnSignIn.setMode(ActionProcessButton.Mode.PROGRESS);

//有进度的进度条

// no progress

button.setProgress(0);

// progressDrawable cover 50% of button width, progressText is shown

button.setProgress(50);

// progressDrawable cover 75% of button width, progressText is shown

button.setProgress(75);

// completeColor & completeText is shown

button.setProgress(100);

//显示无尽进度条

btnSignIn.setMode(ActionProcessButton.Mode.ENDLESS);

// 设置进度> 0以启动进度指示器动画

button.setProgress(1);

还有更多参考用户指南(转)

https://github.com/dmytrodanylyk/android-process-button/wiki/User-Guide#action-process-button

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值