Code Monkey home page Code Monkey logo

Comments (12)

SjAndy88 avatar SjAndy88 commented on May 19, 2024

遇到全屏DialogFragment会出现状态栏出现半透明,使用sdk也不能做成透明

from immersionbar.

gyf-dev avatar gyf-dev commented on May 19, 2024

@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;
    }

from immersionbar.

SjAndy88 avatar SjAndy88 commented on May 19, 2024

还有Dialog中的有输入框的问题,我也基本实现了,主要就是window和contentview这两个,不过和现在代码不是很契合,因为现在代码主体还是用Activity去弄的。 代码的逻辑和目前sdk中的逻辑没有区别,主要是看如何吧dialog给兼容进去,个人觉得如果不好改的话可以单独实现个dialog相关的sdk

from immersionbar.

gyf-dev avatar gyf-dev commented on May 19, 2024

@flztsj 2.2.7版本更新dialog使用,现在已经改的差不多了,测试中

from immersionbar.

SjAndy88 avatar SjAndy88 commented on May 19, 2024

Ok,辛苦

from immersionbar.

gyf-dev avatar gyf-dev commented on May 19, 2024

@flztsj 已经更新2.2.7版本

from immersionbar.

SjAndy88 avatar SjAndy88 commented on May 19, 2024

全屏DialogFragment有Bug,多次切换会出现空白

device-2017-08-03-003641.mp4.zip

from immersionbar.

gyf-dev avatar gyf-dev commented on May 19, 2024

@flztsj 看图
wx20170803-104928 2x

from immersionbar.

SjAndy88 avatar SjAndy88 commented on May 19, 2024

了解,现在我用最新的版本demo泡在Api19的模拟器上 输入法弹不出来,你那边有这个情况吗?

from immersionbar.

SjAndy88 avatar SjAndy88 commented on May 19, 2024

建议加入https://github.com/square/leakcanary 检测内存泄露

from immersionbar.

SjAndy88 avatar SjAndy88 commented on May 19, 2024

@gyf-dev
KeyboardPatch里面的mActivity.getWindow()在Dialog的情况下应该替换成Dialog自己的window,我这边换了,那个多次切换会出现空白好像Ok了。

from immersionbar.

gyf-dev avatar gyf-dev commented on May 19, 2024

@flztsj 模拟器上输入法无法弹出,你要到设置界面设置一下,我现在就是使用的dialog的Window

from immersionbar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.