Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【功能建议】可以为DialogX 加入优先级显示吗? #442

Closed
anypwx opened this issue May 11, 2024 · 2 comments
Closed

【功能建议】可以为DialogX 加入优先级显示吗? #442

anypwx opened this issue May 11, 2024 · 2 comments
Labels
已处理 已处理,等待结单 新需求 新功能需求标记

Comments

@anypwx
Copy link

anypwx commented May 11, 2024

功能建议

可以为DialogX 加入优先级显示吗?

需求描述:

有些需求在多个对话框弹出,需要有一定的先后顺序。比如存在 a b c 三个弹窗,他们显示的顺序是 b a c 。c 在最下面, b 在最上面

@kongzue
Copy link
Owner

kongzue commented May 11, 2024

默认情况下确实不支持,不过您可以尝试将要显示在最顶部的对话框使用 build() 方法构建,设置 dialogImplMode为其他模式来实现优先级的提升。
其原理是默认情况下 DialogX 是使用 View 模式插入到 activity 的界面前进行显示的,但若使用其他构建模式,例如 Window,是绝对优先于 activity 的界面层级显示的,就能实现最高优先级显示的效果。

@kongzue kongzue added the 新需求 新功能需求标记 label May 17, 2024
@kongzue
Copy link
Owner

kongzue commented May 17, 2024

已在 0.0.50.beta12 提供。

相关更新日志:

  • 新增各对话框支持 get/setThisOrderIndex(int) 来设置对话框层级,以及 bringToFront() 直接置顶对话框;

@kongzue kongzue closed this as completed May 17, 2024
@kongzue kongzue added the 已处理 已处理,等待结单 label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
已处理 已处理,等待结单 新需求 新功能需求标记
Projects
None yet
Development

No branches or pull requests

2 participants