From 6b110748de31cd0ecb667d1eb5b1b296e116c1d1 Mon Sep 17 00:00:00 2001 From: "jiedong.wang" Date: Sat, 26 Oct 2024 19:25:41 +0800 Subject: [PATCH] =?UTF-8?q?asInputConfirm=E6=96=B9=E6=B3=95=E5=A4=8D?= =?UTF-8?q?=E7=94=A8=E7=8E=B0=E6=9C=89=E5=B8=83=E5=B1=80=E6=97=B6=EF=BC=8C?= =?UTF-8?q?OnInputConfirmListener=E6=8E=A5=E5=8F=A3=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E5=9B=9E=E4=BC=A0=E7=BB=99=E8=B0=83=E7=94=A8?= =?UTF-8?q?=E6=96=B9=EF=BC=8C=E4=B8=8D=E5=BD=B1=E5=93=8D=E6=97=A7=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E7=9A=84=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/lxj/xpopupdemo/fragment/QuickStartDemo.java | 6 ++++-- app/src/main/res/layout/my_confim_popup.xml | 8 ++++++++ .../com/lxj/xpopup/impl/InputConfirmPopupView.java | 8 ++++++-- .../lxj/xpopup/interfaces/OnInputConfirmListener.java | 10 +++++++++- 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/lxj/xpopupdemo/fragment/QuickStartDemo.java b/app/src/main/java/com/lxj/xpopupdemo/fragment/QuickStartDemo.java index 68ec02a5..effe9ddc 100644 --- a/app/src/main/java/com/lxj/xpopupdemo/fragment/QuickStartDemo.java +++ b/app/src/main/java/com/lxj/xpopupdemo/fragment/QuickStartDemo.java @@ -11,6 +11,7 @@ import android.util.Log; import android.view.View; import android.view.ViewGroup; +import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; @@ -183,8 +184,9 @@ public void onConfirm() { "注意:你自己的布局必须提供一些控件Id,否则XPopup找不到View。\n具体需要提供哪些Id,请查看文档[内置弹窗]一章。", null, new OnInputConfirmListener() { @Override - public void onConfirm(String text) { - + public void onNewConfirm(BasePopupView view) { + EditText et2 = view.findViewById(R.id.et_input2); + ToastUtils.showShort(et2.getText()); } }, null, R.layout.my_confim_popup) //最后一个参数绑定已有布局 .show(); diff --git a/app/src/main/res/layout/my_confim_popup.xml b/app/src/main/res/layout/my_confim_popup.xml index 13fe6004..63b355b5 100644 --- a/app/src/main/res/layout/my_confim_popup.xml +++ b/app/src/main/res/layout/my_confim_popup.xml @@ -44,6 +44,14 @@ android:lines="4" android:layout_width="match_parent" android:layout_height="wrap_content"/> + +