1 Star 0 Fork 0

wsln / PopupActionManger

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 1.35 KB
一键复制 编辑 原始数据 按行查看 历史
wsln 提交于 2021-05-14 17:31 . update readme

PopupActionManger

弹窗行为管理(PAM)

使用队列来存取行为(action)数据,使用策略模式来完成popupwindow和dialog的配置。

使用方式

java

AlertDialog dialog1 = new AlertDialog.Builder(JavaActivity.this)
                        .setTitle("update")
                        .setIcon(R.mipmap.ic_launcher_round)
                        .setMessage("更新信息更新信息更新信息更新信息更新信息")
                        .setPositiveButton("确认", (dialog, which) -> dialog.dismiss())
                        .setNegativeButton("取消", (dialog, which) -> {
                            dialog.dismiss();
                        })
                        .create();
                DialogAction action1 = new DialogAction(dialog1);
                ActionManager.getInstance().pushToQueue(action1);

kotlin

val dialog1 = AlertDialog.Builder(this)
                .setTitle("kotlin测试")
                .setMessage("测试,测试,测试")
                .setPositiveButton(
                    "confirm"
                ) { dialog, which -> dialog.dismiss() }
                .setNegativeButton("cancel") { dialog, which ->
                    dialog.dismiss()
                }
                .create()
            var da1 = DialogAction(dialog1)
            PopActionManager.pullToQueue(da1)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/wsln/popup-action-manger.git
git@gitee.com:wsln/popup-action-manger.git
wsln
popup-action-manger
PopupActionManger
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891