修改防抖点击问题
This commit is contained in:
@@ -12,6 +12,7 @@ import com.lxj.xpopup.animator.PopupAnimator;
|
||||
import com.lxj.xpopup.core.CenterPopupView;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
/**
|
||||
* 输入弹窗
|
||||
@@ -54,15 +55,21 @@ public class InputCustomPopup extends CenterPopupView {
|
||||
findViewById(R.id.btn_confirm).setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
String textContent = content.getText().toString();
|
||||
if (TextUtils.isEmpty(textContent)) {
|
||||
ToastUtil.show("输入内容不可为空");
|
||||
return;
|
||||
}
|
||||
if (listener != null) {
|
||||
listener.onConfirm(textContent);
|
||||
}
|
||||
dismiss(); // 关闭弹窗
|
||||
ViewClicksAntiShake.clicksAntiShake(v, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
String textContent = content.getText().toString();
|
||||
if (TextUtils.isEmpty(textContent)) {
|
||||
ToastUtil.show("输入内容不可为空");
|
||||
return;
|
||||
}
|
||||
if (listener != null) {
|
||||
listener.onConfirm(textContent);
|
||||
}
|
||||
dismiss(); // 关闭弹窗
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user