From 74ec0a8713cf0531eb0cdf80fb6185fb56c50287 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Mon, 9 Oct 2023 17:41:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=AD=E8=8B=B1=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dialog/MatchSuccessfullyPopup.java | 24 ++++++++++++++++++- .../res/layout/match_successfully_popup.xml | 6 +++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 OneToOne/src/main/res/layout/match_successfully_popup.xml diff --git a/OneToOne/src/main/java/com/shayu/onetoone/dialog/MatchSuccessfullyPopup.java b/OneToOne/src/main/java/com/shayu/onetoone/dialog/MatchSuccessfullyPopup.java index 0932554ab..d05c71389 100644 --- a/OneToOne/src/main/java/com/shayu/onetoone/dialog/MatchSuccessfullyPopup.java +++ b/OneToOne/src/main/java/com/shayu/onetoone/dialog/MatchSuccessfullyPopup.java @@ -1,7 +1,29 @@ package com.shayu.onetoone.dialog; +import android.content.Context; + +import androidx.annotation.NonNull; + +import com.lxj.xpopup.core.CenterPopupView; +import com.shayu.onetoone.R; + /** * 首次匹配成功 */ -class MatchSuccessfullyPopup { +public class MatchSuccessfullyPopup extends CenterPopupView { + public MatchSuccessfullyPopup(@NonNull Context context) { + super(context); + } + + // 返回自定义弹窗的布局 + @Override + protected int getImplLayoutId() { + return R.layout.match_successfully_popup; + } + + // 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑 + @Override + protected void onCreate() { + super.onCreate(); + } } diff --git a/OneToOne/src/main/res/layout/match_successfully_popup.xml b/OneToOne/src/main/res/layout/match_successfully_popup.xml new file mode 100644 index 000000000..c13e8ede8 --- /dev/null +++ b/OneToOne/src/main/res/layout/match_successfully_popup.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file