提供取消跟确认状态按钮 高仿微信朋友圈相机拍照按钮效果
话不多说 看图
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
compile 'com.github.xiangdingquan:ChangeButton:1.0.0'
}
<org.xdq.library.ChanggeButtonLayout
android:id="@+id/one"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</org.xdq.library.ChanggeButtonLayout>
buttonLayout.setSeparateClickListener(new SeparateClickListener() {
@Override
public void onCancle() {
Toast.makeText(getApplicationContext(), "取消", Toast.LENGTH_SHORT).show();
}
@Override
public void onConfirm() {
Toast.makeText(getApplicationContext(), "确认", Toast.LENGTH_SHORT).show();
}
});
buttonLayout.setCenterClickListener(new CenterClickListener() {
@Override
public void click() {
Toast.makeText(getApplicationContext(), "执行任务", Toast.LENGTH_SHORT).show();
}
});
An android developer in WuHan