-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
DialogFragment有适配吗? #35
Comments
遇到全屏DialogFragment会出现状态栏出现半透明,使用sdk也不能做成透明 |
@flztsj 没有适配,我刚才试验了一下,在onCreateDialog方法里,可以实现,准备下个版本适配,代码如下: @Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
Dialog dialog = super.onCreateDialog(savedInstanceState);
Window window = dialog.getWindow();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && !OSUtils.isEMUI3_1()) {
int flags = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
window.setStatusBarColor(Color.TRANSPARENT);
window.getDecorView().setSystemUiVisibility(flags);
} else
window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
}
return dialog;
} |
还有Dialog中的有输入框的问题,我也基本实现了,主要就是window和contentview这两个,不过和现在代码不是很契合,因为现在代码主体还是用Activity去弄的。 代码的逻辑和目前sdk中的逻辑没有区别,主要是看如何吧dialog给兼容进去,个人觉得如果不好改的话可以单独实现个dialog相关的sdk |
@flztsj 2.2.7版本更新dialog使用,现在已经改的差不多了,测试中 |
Ok,辛苦 |
@flztsj 已经更新2.2.7版本 |
全屏DialogFragment有Bug,多次切换会出现空白 |
了解,现在我用最新的版本demo泡在Api19的模拟器上 输入法弹不出来,你那边有这个情况吗? |
建议加入https://github.com/square/leakcanary 检测内存泄露 |
@gyf-dev |
@flztsj 模拟器上输入法无法弹出,你要到设置界面设置一下,我现在就是使用的dialog的Window |
No description provided.
The text was updated successfully, but these errors were encountered: