From c37aecc354125764195f24073e7e2d5933dd43bb Mon Sep 17 00:00:00 2001 From: niushuai233 Date: Fri, 28 Oct 2022 14:30:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8A=BD=E5=8F=96=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../devcontrol/base/ui/BaseActivity.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/app/src/main/java/cc/niushuai/project/devcontrol/base/ui/BaseActivity.java b/app/src/main/java/cc/niushuai/project/devcontrol/base/ui/BaseActivity.java index 27441e6..ac83f19 100644 --- a/app/src/main/java/cc/niushuai/project/devcontrol/base/ui/BaseActivity.java +++ b/app/src/main/java/cc/niushuai/project/devcontrol/base/ui/BaseActivity.java @@ -139,6 +139,26 @@ public abstract class BaseActivity extends AppCompatActivity { moreSetView.setOnClickListener(view -> ActivityUtil.startActivity(activity, clazz, withData)); } + /** + * 更多设置 打开新的activity + * + * @param activity 源activity + * @param clazz 目标activity + * @param keys activity之间传递数据 + * @param values activity之间传递数据 + * @author niushuai + * @date: 2022/10/19 14:47 + */ + protected void activityButtonMoreSetClickListener(boolean display, BaseActivity activity, Class clazz, String[] keys, String[] values) { + + View moreSetView = findViewById(R.id.activity_title_more_set); + if (!display) { + moreSetView.setVisibility(View.GONE); + return; + } + moreSetView.setOnClickListener(view -> ActivityUtil.startActivity(activity, clazz, keys, values)); + } + /** * 自定义moreSet点击事件 *