fix: 抽取方法调用

This commit is contained in:
niushuai233 2022-10-28 14:30:54 +08:00
parent 30bc9ff8af
commit c37aecc354

View File

@ -139,6 +139,26 @@ public abstract class BaseActivity extends AppCompatActivity {
moreSetView.setOnClickListener(view -> ActivityUtil.startActivity(activity, clazz, withData)); 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<? extends BaseActivity> 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点击事件 * 自定义moreSet点击事件
* *