Android的导航栏覆盖我的看法 [英] Android Navigation Bar overlaying my view

查看:2192
本文介绍了Android的导航栏覆盖我的看法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我就如Nexus等设备只要在所有的设备,不具备硬件菜单按钮,有一个问题,Android的导航栏。

I have an issue with Android Navigation Bar on devices like Nexus etc. Simply at all devices, which do not have the hardware menu button.

让我更详细地解释了这个问题。

Let me explain the issue in more details.

予有那里有​​3份的应用程序。内容,动作条和底部面板采用了搜索栏。

I have an application where there are 3 parts. Content, ActionBar and bottom panel with a SeekBar.

动作条和底部面板采用了搜索栏被覆盖的内容。每次我点击动作条和底部面板采用了搜索栏消失的内容。它的工作原理完全它的工作方式。下面是一个code我使用隐藏的系统UI的一个片段:

ActionBar and bottom panel with a SeekBar are overlaying the content. Everytime I click on the content the ActionBar and bottom panel with a SeekBar disappear. Which works exactly the way it has to work. Here is a fragment of a code I use for hiding system UI:

if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) {                
            decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                    | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN
                    | View.SYSTEM_UI_FLAG_IMMERSIVE);
} else {                
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN);
    actionBar.hide();
}
findViewById(R.id.read_book_bottom_bar).setVisibility(View.GONE);

的onCreate 我的活动方式,我这块code:

In onCreate method of my activity, I have this piece of code:

if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) {            
    getWindow().requestFeature(Window.FEATURE_ACTION_BAR_OVERLAY);          
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_IN_OVERSCAN);   
}

然而,当我发动对与Android导航栏设备的应用,还有与一个搜索栏显示面板底部的一个问题。简单地说,Android的导航栏覆盖底部面板采用了搜索栏。下面是截图:

However, when I launch the application on devices with Android Navigation Bar, there is a problem with displaying the bottom panel with a SeekBar. Simply, the Android Navigation Bar overlays the bottom panel with a SeekBar. Here is a screenshot:

但每次我点击的内容,Android的导航栏消失,随着动作条和底部面板与搜索栏。所以,问题是,每次有人想用底板上如Nexus设备上的搜索栏,他/她将无法使用它,因为它隐藏在Android的导航栏。

But everytime I click on the content, the Android Navigation Bar disappears along with the ActionBar and the bottom panel with the SeekBar. So, the issue is, that everytime somebody would like to use the bottom panel with the SeekBar on devices like NEXUS, he/she would not be able to use it, because it's hidden under the Android Navigation Bar.

有谁能帮我解决这个问题?谢谢大家提前。

Could anybody help me with solving this issue? Thank you all in advance.

推荐答案

最后,我用属性解决了 fitSystemWindows = TRUE

Finally, I solved it with attribute fitSystemWindows = true.

这篇关于Android的导航栏覆盖我的看法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆