android - 安卓虚拟导航栏如何更改外观(颜色是黑的,很难看)
大家讲道理
大家讲道理 2017-04-17 16:18:00
0
2
759

虚拟导航栏只有黑色,能不能调成半透明或是多加一个隐藏摁键?

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(2)
巴扎黑

Transparency is achievable,

Window window = getWindow();
    // 状态栏透明
    window.setFlags(
        WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS,
        WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
    // 虚拟导航栏透明
    window.setFlags(
        WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION,
        WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);

You need to check the version, which is only available after 4.4.
The corresponding activity layout needs to add the following attribute to the layout root node.

android:fitsSystemWindows="true"
洪涛

getWindow().setNavigationBarColor() can set the color of the bottom navigation bar
getWindow().setStatusBarColor() can set the color of the top status bar

If you want the layout to extend to the navigation bar or status bar, refer to the 1L settings

The bottom navigation bar is designed to add buttons...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!