如何更改软键的颜色为白色android系统(导航按钮) [英] How do I change the color of soft keys to white in android(Navigation buttons)
本文介绍了如何更改软键的颜色为白色android系统(导航按钮)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想提出一个基本的桌面应用地方,我需要我的通知栏和状态栏是完全透明的。所以我用低于code。
I am making a basic launcher app where i needed my notification bar and status bar to be perfectly transparent. So i used below code.
Window w = getWindow(); // in Activity's onCreate() for instance
w.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
其中的伎俩,但功能键的颜色
不是白色,如下面的图。
Which does the trick but the color of the softkeys is not white as shown in figure below.
我如何使它白色的?
推荐答案
好吧终于解开了它的棒棒糖。但我没有在设备测试低于棒棒糖。
Ok finally solved it in lollipop. But i haven't tested in devices lower than lollipop.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Window window = getWindow();
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
window.setStatusBarColor(Color.TRANSPARENT);
window.setNavigationBarColor(Color.TRANSPARENT);
}
这篇关于如何更改软键的颜色为白色android系统(导航按钮)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文