怎么改变我安卓手机虚拟按键键的颜色?

后使用快捷导航没有帐号?
其他登录方式
查看: 24674|回复: 784
在线时间15239 小时最后登录阅读权限100UID9359381
注册时间积分153787精华2主题帖子 金币20420 元 智豆830 点
14:32 上传
软件名称:虚拟键美化 SoftKeyz
软件版本:v14.5已付费版
软件语言:英文
软件大小:3.1M
软件包名:com.janis605.softkeyz
支持系统:Android 4.0+
测试机型:联想 P780
【软件介绍】
拥有一台没有实体按键的手机或者是平板吗?如果您使用的系统没有自带更改状态栏,这部分的美化可能并不容易。任务栏替换SoftKeyz帮您轻松改变,您也可以自己导入设计好的按键图案。
这是一个可以用来美化Android 4.0以上系统的虚拟键位的软件,例如你可以用它来修改手机主屏中虚拟home键的样式或者颜色等,操作很简单,不同的键位都提供了多种样式可供选择。此软件只支持Android4.0以上系统。
【更新说明】
-fixed several bugs and OutOfMemory problems
-hopefully fixed the random force-close situations
-changed some texts
-(re)added the contribute button to the Online Gallery
-The Online Gallery can now be sorted by the date of upload
-&date added& is the standard sorting algorithm
-faster swiping between the three main screens
【软件截图】
14:32 上传
14:32 上传
14:32 上传
14:32 上传
14:32 上传
【注意事项】
凡安智软件区所发资源,如发现无法运行、版本不符,都可以私信联系我,我将在第一时间处理。
下载地址:游客,如果您要查看本帖隐藏内容请或点击感谢按钮
在线时间1434 小时最后登录阅读权限45UID
智友讲师, 积分 3418, 距离下一级还需 1582 积分
注册时间积分3418精华0主题帖子 金币4007 元 智豆0 点
来自智友移动版
感谢分享& &&&
在线时间786 小时最后登录阅读权限35UID5633280
智友博士生, 积分 1748, 距离下一级还需 52 积分
注册时间积分1748精华0主题帖子 金币3036 元 智豆66 点
感谢分享……
在线时间786 小时最后登录阅读权限35UID5633280
智友博士生, 积分 1748, 距离下一级还需 52 积分
注册时间积分1748精华0主题帖子 金币3036 元 智豆66 点
感谢分享……
在线时间786 小时最后登录阅读权限35UID5633280
智友博士生, 积分 1748, 距离下一级还需 52 积分
注册时间积分1748精华0主题帖子 金币3036 元 智豆66 点
感谢分享……
在线时间786 小时最后登录阅读权限35UID5633280
智友博士生, 积分 1748, 距离下一级还需 52 积分
注册时间积分1748精华0主题帖子 金币3036 元 智豆66 点
感谢分享……
在线时间2142 小时最后登录阅读权限70UID2986622
智友校长, 积分 30129, 距离下一级还需 19871 积分
注册时间积分30129精华0主题帖子 金币23825 元 智豆1471 点
感谢楼主的热心分享 :)& & 安智有你更精彩。
在线时间409 小时最后登录阅读权限35UID9378992
智友博士生, 积分 1528, 距离下一级还需 272 积分
注册时间积分1528精华0主题帖子 金币2652 元 智豆10 点
来自智友移动版
安智有你更精彩
在线时间706 小时最后登录阅读权限35UID750826
智友博士生, 积分 1583, 距离下一级还需 217 积分
注册时间积分1583精华0主题帖子 金币1426 元 智豆77 点
秒杀隐藏帖..但还是希望楼主多发精品好帖啦.....
在线时间1893 小时最后登录阅读权限60UID4146205
智友博导, 积分 15456, 距离下一级还需 2544 积分
注册时间积分15456精华0主题帖子 金币17115 元 智豆960 点
感谢楼主分享
十二生肖-丑牛
十二生肖-丑牛勋章
安智土豪勋章
金币超过十万的可申请
安智全勤勋章
签到满一百天即可申请
安智万帖勋章
在安智网的帖子量超过1万可申请
安智资源组勋章
安智资源组勋章
主题5000个
双鱼座勋章
十二生肖-巳蛇
十二生肖-巳蛇勋章
狮子座勋章
告诉你什么才是个性模块化◇关注京东
◇客户服务
用户数:3778|帖子数:98
LG G4虚拟按键的隐藏用法
& & 大家好,又到了新的一周LG G4评测时间了。本周&G锋相对&的主题是&只有我知道,LG G4可以这样用&,看了一下官方的示例都是评测拍照方面的,那么我就另类一点,给大家讲解一下LG G4系统虚拟按键的隐藏用法,由于我正在使用的手机不是采用虚拟按键的,所以本期就无法做对比讲解了。
& & & 打开系统设置&显示屏&主页触摸按纽,里面有三项设置,我们先来看第一个设置&按纽组合&。
& & & LG G4的虚拟按键默认排列的是4个功能键,其中只有最右边那个键可以更换,更换很简单,只要把下面系统提供的虚拟功能键拖动上去就可以了,最多只能合并5个主页触摸按键,为了美观,我还是只设4个。如图所示,我把系统默认的双卡设置按纽更换为分屏显示按纽了。
& & & 第二个设置是&颜色&,指的是主页虚拟按键的背景色,系统只提供了黑白两色选择,默认是黑色,我把它改为白色,大家对比看下。
& & & 第三个设置是&隐藏主页触摸按纽&,虚拟按键最让国人难以接受的就是占用屏幕空间,为了解决这个问题,LG G4的解决方案是可以针对每个应用设置是否自动隐藏虚拟按键,我们来试试。
& & & 进入设置界面,我们选一个应用来看看效果。勾选后退回桌面打开此应用。
& & & 3秒无操作,下方的虚拟按键会自动隐藏,需要使用时手指往上一划,按键又会弹出。
& & & 本期LG G4虚拟按键的隐藏用法就讲解到这里,希望大家能发现LG G4的更多功能用法。
亲,想要回复请先哦
多品类齐全,轻松购物
快多仓直发,极速配送
好正品行货,精致服务
省天天低价,畅选无忧酷派手机虚拟键颜色怎么改_百度知道1219人阅读
Android-SystemUI(1)
&&& 三个虚拟按键的设置是在framework层中。
&& &先查看三个按键的布局的初始化:
位置 frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java:
protected PhoneStatusBarView makeStatusBarView() {
if (showNav) {
&&&&&&&&&&&&&&& mNavigationBarView =
&&&&&&&&&&&&&&&&&&& (NavigationBarView) View.inflate(context, R.layout.navigation_bar, null);
&&&&&&&&&&&&&&& mNavigationBarView.setDisabledFlags(mDisabled);
&&&&&&&&&&&&&&& mNavigationBarView.setBar(this);
&&&&&&&&&&&&&&& mNavigationBarView.setOnTouchListener(new View.OnTouchListener() {
&&&&&&&&&&&&&&&&&&& @Override
&&&&&&&&&&&&&&&&&&& public boolean onTouch(View v, MotionEvent event) {
&&&&&&&&&&&&&&&&&&&&&&& checkUserAutohide(v, event);
&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&&& }});
&&&&&&&&&&& }
&& &在上面的代码中,mNavigationBarView = (NavigationBarView) View.inflate(context, R.layout.navigation_bar, null),该代码动态加载了该布局。常看该布局的代码:
位置 frameworks/base/packages/SystemUI/res/layout/navigation_bar.xml:
&com.android.systemui.statusbar.phone.NavigationBarView
&&& xmlns:android=&/apk/res/android&
&&& xmlns:systemui=&/apk/res/com.android.systemui&
&&& android:layout_height=&match_parent&
&&& android:layout_width=&match_parent&
&&& android:background=&@drawable/system_bar_background&
&&& &FrameLayout android:id=&@+id/rot0&
&&&&&&& android:layout_height=&match_parent&
&&&&&&& android:layout_width=&match_parent&
&&&&&&& &LinearLayout
&&&&&&&&&&& android:layout_height=&match_parent&
&&&&&&&&&&& android:layout_width=&match_parent&
&&&&&&&&&&& android:orientation=&horizontal&
&&&&&&&&&&& android:clipChildren=&false&
&&&&&&&&&&& android:clipToPadding=&false&
&&&&&&&&&&& android:id=&@+id/nav_buttons&
&&&&&&&&&&& android:animateLayoutChanges=&true&
&&&&&&&&&&& &
&&&&&&&&&&& &!-- navigation controls --&
&&&&&&&&&&& &View
&&&&&&&&&&&&&&& android:layout_width=&40dp&
&&&&&&&&&&&&&&& android:layout_height=&match_parent&
&&&&&&&&&&&&&&& android:layout_weight=&0&
&&&&&&&&&&&&&&& android:visibility=&invisible&
&&&&&&&&&&&&&&& /&
&&&&&&&&&&& &com.android.systemui.statusbar.policy.KeyButtonView android:id=&@+id/back&
&&&&&&&&&&&&&&& android:layout_width=&@dimen/navigation_key_width&
&&&&&&&&&&&&&&& android:layout_height=&match_parent&
&&&&&&&&&&&&&&& android:src=&@drawable/ic_sysbar_back&
&&&&&&&&&&&&&&& systemui:keyCode=&4&
&&&&&&&&&&&&&&& android:layout_weight=&0&
&&&&&&&&&&&&&&& android:scaleType=&center&
&&&&&&&&&&&&&&& systemui:glowBackground=&@drawable/ic_sysbar_highlight&
&&&&&&&&&&&&&&& android:contentDescription=&@string/accessibility_back&
&&&&&&&&&&&&&&& /&
&&&&&&&&&&& &View
&&&&&&&&&&&&&&& android:layout_width=&match_parent&
&&&&&&&&&&&&&&& android:layout_height=&match_parent&
&&&&&&&&&&&&&&& android:layout_weight=&1&
&&&&&&&&&&&&&&& android:visibility=&invisible&
&&&&&&&&&&&&&&& /&
&&&&&&&&&&& &com.android.systemui.statusbar.policy.KeyButtonView android:id=&@+id/home&
&&&&&&&&&&&&&&& android:layout_width=&@dimen/navigation_key_width&
&&&&&&&&&&&&&&& android:layout_height=&match_parent&
&&&&&&&&&&&&&&& android:src=&@drawable/ic_sysbar_home&
&&&&&&&&&&&&&&& systemui:keyCode=&3&
&&&&&&&&&&&&&&& systemui:keyRepeat=&false&
&&&&&&&&&&&&&&& android:layout_weight=&0&
&&&&&&&&&&&&&&& systemui:glowBackground=&@drawable/ic_sysbar_highlight&
&&&&&&&&&&&&&&& android:contentDescription=&@string/accessibility_home&
&&&&&&&&&&&&&&& /&
&&&&&&&&&&& &View
&&&&&&&&&&&&&&& android:layout_width=&match_parent&
&&&&&&&&&&&&&&& android:layout_height=&match_parent&
&&&&&&&&&&&&&&& android:layout_weight=&1&
&&&&&&&&&&&&&&& android:visibility=&invisible&
&&&&&&&&&&&&&&& /&
&&&&&&&&&&& &com.android.systemui.statusbar.policy.KeyButtonView android:id=&@+id/recent_apps&
&&&&&&&&&&&&&&& android:layout_width=&@dimen/navigation_key_width&
&&&&&&&&&&&&&&& android:layout_height=&match_parent&
&&&&&&&&&&&&&&& android:src=&@drawable/ic_sysbar_recent&
&&&&&&&&&&&&&&& android:layout_weight=&0&
&&&&&&&&&&&&&&& systemui:glowBackground=&@drawable/ic_sysbar_highlight&
&&&&&&&&&&&&&&& android:contentDescription=&@string/accessibility_recent&
&&&&&&&&&&&&&&& /&
&&&&&&&&&&& &com.android.systemui.statusbar.policy.KeyButtonView android:id=&@+id/menu&
&&&&&&&&&&&&&&& android:layout_width=&@dimen/navigation_menu_key_width&
&&&&&&&&&&&&&&& android:layout_height=&match_parent&
&&&&&&&&&&&&&&& android:src=&@drawable/ic_sysbar_menu&
&&&&&&&&&&&&&&& systemui:keyCode=&82&
&&&&&&&&&&&&&&& android:layout_weight=&0&
&&&&&&&&&&&&&&& android:visibility=&invisible&
&&&&&&&&&&&&&&& android:contentDescription=&@string/accessibility_menu&
&&&&&&&&&&&&&&& systemui:glowBackground=&@drawable/ic_sysbar_highlight&
&&&&&&&&&&&&&&& /&
&&&&&&& &/LinearLayout&
&&&&&&& &!-- lights out layout to match exactly --&
&&&&&&& &LinearLayout
&&&&&&&&&&& android:layout_height=&match_parent&
&&&&&&&&&&& android:layout_width=&match_parent&
&&&&&&&&&&& android:orientation=&horizontal&
&&&&&&&&&&& android:id=&@+id/lights_out&
&&&&&&&&&&& android:visibility=&gone&
&&&&&&&&&&& &
&&&&&&&&&&& &ImageView
&&&&&&&&&&&&&&& android:layout_width=&80dp&
&&&&&&&&&&&&&&& android:layout_height=&match_parent&
&&&&&&&&&&&&&&& android:layout_marginStart=&40dp&
&&&&&&&&&&&&&&& android:src=&@drawable/ic_sysbar_lights_out_dot_small&
&&&&&&&&&&&&&&& android:scaleType=&center&
&&&&&&&&&&&&&&& android:layout_weight=&0&
&&&&&&&&&&&&&&& /&
&&&&&&&&&&& &View
&&&&&&&&&&&&&&& android:layout_width=&match_parent&
&&&&&&&&&&&&&&& android:layout_height=&match_parent&
&&&&&&&&&&&&&&& android:layout_weight=&1&
&&&&&&&&&&&&&&& android:visibility=&invisible&
&&&&&&&&&&&&&&& /&
&&&&&&&&&&& &ImageView
&&&&&&&&&&&&&&& android:layout_width=&80dp&
&&&&&&&&&&&&&&& android:layout_height=&match_parent&
&&&&&&&&&&&&&&& android:src=&@drawable/ic_sysbar_lights_out_dot_large&
&&&&&&&&&&&&&&& android:scaleType=&center&
&&&&&&&&&&&&&&& android:layout_weight=&0&
&&&&&&&&&&&&&&& /&
&&&&&&&&&&& &View
&&&&&&&&&&&&&&& android:layout_width=&match_parent&
&&&&&&&&&&&&&&& android:layout_height=&match_parent&
&&&&&&&&&&&&&&& android:layout_weight=&1&
&&&&&&&&&&&&&&& android:visibility=&invisible&
&&&&&&&&&&&&&&& /&
&&&&&&&&&&& &ImageView
&&&&&&&&&&&&&&& android:layout_width=&80dp&
&&&&&&&&&&&&&&& android:layout_marginEnd=&40dp&
&&&&&&&&&&&&&&& android:layout_height=&match_parent&
&&&&&&&&&&&&&&& android:src=&@drawable/ic_sysbar_lights_out_dot_small&
&&&&&&&&&&&&&&& android:scaleType=&center&
&&&&&&&&&&&&&&& android:layout_weight=&0&
&&&&&&&&&&&&&&& /&
&&&&&&& &/LinearLayout&
&&&&&&& &FrameLayout
&&&&&&&&&&& android:layout_width=&match_parent&
&&&&&&&&&&& android:layout_height=&match_parent&&
&&&&&&&&&&& &com.android.systemui.statusbar.policy.KeyButtonView
&&&&&&&&&&&&&&& android:layout_width=&80dp&
&&&&&&&&&&&&&&& android:id=&@+id/search_light&
&&&&&&&&&&&&&&& android:layout_height=&match_parent&
&&&&&&&&&&&&&&& android:layout_gravity=&center&
&&&&&&&&&&&&&&& android:src=&@drawable/search_light&
&&&&&&&&&&&&&&& android:scaleType=&center&
&&&&&&&&&&&&&&& android:visibility=&gone&
&&&&&&&&&&&&&&& android:contentDescription=&@string/accessibility_search_light&
&&&&&&&&&&&&&&& /&
&&&&&&&&&&& &com.android.systemui.statusbar.policy.KeyButtonView
&&&&&&&&&&&&&&& android:id=&@+id/camera_button&
&&&&&&&&&&&&&&& android:layout_height=&match_parent&
&&&&&&&&&&&&&&& android:layout_width=&80dp&
&&&&&&&&&&&&&&& android:layout_gravity=&center_vertical|right&
&&&&&&&&&&&&&&& android:src=&@drawable/ic_sysbar_camera&
&&&&&&&&&&&&&&& android:scaleType=&center&
&&&&&&&&&&&&&&& android:visibility=&gone&
&&&&&&&&&&&&&&& android:contentDescription=&@string/accessibility_camera_button&
&&&&&&&&&&&&&&& /&
&&&&&&& &/FrameLayout&
&&&&&&& &com.android.systemui.statusbar.policy.DeadZone
&&&&&&&&&&& android:id=&@+id/deadzone&
&&&&&&&&&&& android:layout_height=&match_parent&
&&&&&&&&&&& android:layout_width=&match_parent&
&&&&&&&&&&& systemui:minSize=&@dimen/navigation_bar_deadzone_size&
&&&&&&&&&&& systemui:maxSize=&@dimen/navigation_bar_deadzone_size_max&
&&&&&&&&&&& systemui:holdTime=&@integer/navigation_bar_deadzone_hold&
&&&&&&&&&&& systemui:decayTime=&@integer/navigation_bar_deadzone_decay&
&&&&&&&&&&& systemui:orientation=&horizontal&
&&&&&&&&&&& android:layout_gravity=&top&
&&&&&&&&&&& /&
&&& &/FrameLayout&
&&& &FrameLayout android:id=&@+id/rot90&
&&&&&&& android:layout_height=&match_parent&
&&&&&&& android:layout_width=&match_parent&
&&&&&&& android:visibility=&gone&
&&&&&&& android:paddingTop=&0dp&
&&&&&&& &LinearLayout
&&&&&&&&&&& android:layout_height=&match_parent&
&&&&&&&&&&& android:layout_width=&match_parent&
&&&&&&&&&&& android:orientation=&vertical&
&&&&&&&&&&& android:clipChildren=&false&
&&&&&&&&&&& android:clipToPadding=&false&
&&&&&&&&&&& android:id=&@+id/nav_buttons&
&&&&&&&&&&& android:animateLayoutChanges=&true&
&&&&&&&&&&& &
&&&&&&&&&&& &!-- navigation controls --&
&&&&&&&&&&& &com.android.systemui.statusbar.policy.KeyButtonView android:id=&@+id/menu&
&&&&&&&&&&&&&&& android:layout_height=&40dp&
&&&&&&&&&&&&&&& android:layout_width=&match_parent&
&&&&&&&&&&&&&&& android:src=&@drawable/ic_sysbar_menu_land&
&&&&&&&&&&&&&&& systemui:keyCode=&82&
&&&&&&&&&&&&&&& android:layout_weight=&0&
&&&&&&&&&&&&&&& android:visibility=&invisible&
&&&&&&&&&&&&&&& android:contentDescription=&@string/accessibility_menu&
&&&&&&&&&&&&&&& systemui:glowBackground=&@drawable/ic_sysbar_highlight_land&
&&&&&&&&&&&&&&& /&
&&&&&&&&&&& &com.android.systemui.statusbar.policy.KeyButtonView android:id=&@+id/recent_apps&
&&&&&&&&&&&&&&& android:layout_height=&80dp&
&&&&&&&&&&&&&&& android:layout_width=&match_parent&
&&&&&&&&&&&&&&& android:src=&@drawable/ic_sysbar_recent_land&
&&&&&&&&&&&&&&& android:layout_weight=&0&
&&&&&&&&&&&&&&& android:contentDescription=&@string/accessibility_recent&
&&&&&&&&&&&&&&& systemui:glowBackground=&@drawable/ic_sysbar_highlight_land&
&&&&&&&&&&&&&&& /&
&&&&&&&&&&& &View
&&&&&&&&&&&&&&& android:layout_height=&match_parent&
&&&&&&&&&&&&&&& android:layout_width=&match_parent&
&&&&&&&&&&&&&&& android:layout_weight=&1&
&&&&&&&&&&&&&&& android:visibility=&invisible&
&&&&&&&&&&&&&&& /&
&&&&&&&&&&& &com.android.systemui.statusbar.policy.KeyButtonView android:id=&@+id/home&
&&&&&&&&&&&&&&& android:layout_height=&80dp&
&&&&&&&&&&&&&&& android:layout_width=&match_parent&
&&&&&&&&&&&&&&& android:src=&@drawable/ic_sysbar_home_land&
&&&&&&&&&&&&&&& systemui:keyCode=&3&
&&&&&&&&&&&&&&& systemui:keyRepeat=&false&
&&&&&&&&&&&&&&& android:layout_weight=&0&
&&&&&&&&&&&&&&& android:contentDescription=&@string/accessibility_home&
&&&&&&&&&&&&&&& systemui:glowBackground=&@drawable/ic_sysbar_highlight_land&
&&&&&&&&&&&&&&& /&
&&&&&&&&&&& &View
&&&&&&&&&&&&&&& android:layout_height=&match_parent&
&&&&&&&&&&&&&&& android:layout_width=&match_parent&
&&&&&&&&&&&&&&& android:layout_weight=&1&
&&&&&&&&&&&&&&& android:visibility=&invisible&
&&&&&&&&&&&&&&& /&
&&&&&&&&&&& &com.android.systemui.statusbar.policy.KeyButtonView android:id=&@+id/back&
&&&&&&&&&&&&&&& android:layout_height=&80dp&
&&&&&&&&&&&&&&& android:layout_width=&match_parent&
&&&&&&&&&&&&&&& android:src=&@drawable/ic_sysbar_back_land&
&&&&&&&&&&&&&&& android:scaleType=&center&
&&&&&&&&&&&&&&& systemui:keyCode=&4&
&&&&&&&&&&&&&&& android:layout_weight=&0&
&&&&&&&&&&&&&&& android:contentDescription=&@string/accessibility_back&
&&&&&&&&&&&&&&& systemui:glowBackground=&@drawable/ic_sysbar_highlight_land&
&&&&&&&&&&&&&&& /&
&&&&&&&&&&& &View
&&&&&&&&&&&&&&& android:layout_height=&40dp&
&&&&&&&&&&&&&&& android:layout_width=&match_parent&
&&&&&&&&&&&&&&& android:layout_weight=&0&
&&&&&&&&&&&&&&& android:visibility=&invisible&
&&&&&&&&&&&&&&& /&
&&&&&&& &/LinearLayout&
&&&&&&& &!-- lights out layout to match exactly --&
&&&&&&& &LinearLayout
&&&&&&&&&&& android:layout_height=&match_parent&
&&&&&&&&&&& android:layout_width=&match_parent&
&&&&&&&&&&& android:orientation=&vertical&
&&&&&&&&&&& android:id=&@+id/lights_out&
&&&&&&&&&&& android:visibility=&gone&
&&&&&&&&&&& &
&&&&&&&&&&& &ImageView
&&&&&&&&&&&&&&& android:layout_height=&80dp&
&&&&&&&&&&&&&&& android:layout_marginTop=&40dp&
&&&&&&&&&&&&&&& android:layout_width=&match_parent&
&&&&&&&&&&&&&&& android:src=&@drawable/ic_sysbar_lights_out_dot_small&
&&&&&&&&&&&&&&& android:scaleType=&center&
&&&&&&&&&&&&&&& android:layout_weight=&0&
&&&&&&&&&&&&&&& /&
&&&&&&&&&&& &View
&&&&&&&&&&&&&&& android:layout_height=&match_parent&
&&&&&&&&&&&&&&& android:layout_width=&match_parent&
&&&&&&&&&&&&&&& android:layout_weight=&1&
&&&&&&&&&&&&&&& android:visibility=&invisible&
&&&&&&&&&&&&&&& /&
&&&&&&&&&&& &ImageView
&&&&&&&&&&&&&&& android:layout_height=&80dp&
&&&&&&&&&&&&&&& android:layout_width=&match_parent&
&&&&&&&&&&&&&&& android:src=&@drawable/ic_sysbar_lights_out_dot_large&
&&&&&&&&&&&&&&& android:scaleType=&center&
&&&&&&&&&&&&&&& android:layout_weight=&0&
&&&&&&&&&&&&&&& /&
&&&&&&&&&&& &View
&&&&&&&&&&&&&&& android:layout_height=&match_parent&
&&&&&&&&&&&&&&& android:layout_width=&match_parent&
&&&&&&&&&&&&&&& android:layout_weight=&1&
&&&&&&&&&&&&&&& android:visibility=&invisible&
&&&&&&&&&&&&&&& /&
&&&&&&&&&&& &ImageView
&&&&&&&&&&&&&&& android:layout_height=&80dp&
&&&&&&&&&&&&&&& android:layout_marginBottom=&40dp&
&&&&&&&&&&&&&&& android:layout_width=&match_parent&
&&&&&&&&&&&&&&& android:src=&@drawable/ic_sysbar_lights_out_dot_small&
&&&&&&&&&&&&&&& android:scaleType=&center&
&&&&&&&&&&&&&&& android:layout_weight=&0&
&&&&&&&&&&&&&&& /&
&&&&&&& &/LinearLayout&
&&&&&&& &com.android.systemui.statusbar.policy.KeyButtonView
&&&&&&&&&&& android:id=&@+id/search_light&
&&&&&&&&&&& android:layout_height=&80dp&
&&&&&&&&&&& android:layout_width=&match_parent&
&&&&&&&&&&& android:layout_gravity=&center_vertical&
&&&&&&&&&&& android:src=&@drawable/search_light_land&
&&&&&&&&&&& android:scaleType=&center&
&&&&&&&&&&& android:visibility=&gone&
&&&&&&&&&&& android:contentDescription=&@string/accessibility_search_light&
&&&&&&&&&&& /&
&&&&&&& &!-- No camera button in landscape mode --&
&&&&&&& &com.android.systemui.statusbar.policy.DeadZone
&&&&&&&&&&& android:id=&@+id/deadzone&
&&&&&&&&&&& android:layout_height=&match_parent&
&&&&&&&&&&& android:layout_width=&match_parent&
&&&&&&&&&&& systemui:minSize=&@dimen/navigation_bar_deadzone_size&
&&&&&&&&&&& systemui:maxSize=&@dimen/navigation_bar_deadzone_size_max&
&&&&&&&&&&& systemui:holdTime=&@integer/navigation_bar_deadzone_hold&
&&&&&&&&&&& systemui:decayTime=&@integer/navigation_bar_deadzone_decay&
&&&&&&&&&&& systemui:orientation=&vertical&
&&&&&&&&&&& android:layout_gravity=&top&
&&&&&&&&&&& /&
&&& &/FrameLayout&
&&& &!-- not used --&
&&& &View android:id=&@+id/rot270&
&&&&&&& android:layout_height=&match_parent&
&&&&&&& android:layout_width=&match_parent&
&&&&&&& android:visibility=&gone&
&&&&&&& /&
&/com.android.systemui.statusbar.phone.NavigationBarView&
其中,android:background=&@drawable/system_bar_background&该属性用于设置布局的背景(个人尝试修改该属性,貌似没有起作用)
@drawable/system_bar_background,背景图片就是一种颜色
位置:frameworks/base/packages/SystemUI/res/values/colors.xml
&drawable name=&system_bar_background&&@color/system_bar_background_opaque&/drawable&
&color name=&system_bar_background_opaque&&#&/color&
进入NavigationBarView的源码中查看:
位置:frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
&public NavigationBarView(Context context, AttributeSet attrs) {
&&&&&&& super(context, attrs);
&&&&&&& mDisplay = ((WindowManager)context.getSystemService(
&&&&&&&&&&&&&&& Context.WINDOW_SERVICE)).getDefaultDisplay();
&&&&&&& final Resources res = mContext.getResources();
&&&&&&& mBarSize = res.getDimensionPixelSize(R.dimen.navigation_bar_size);
&&&&&&& mVertical =
&&&&&&& mShowMenu =
&&&&&&& mDelegateHelper = new DelegateViewHelper(this);
&&&&&&& getIcons(res);
&&&&&&& mBarTransitions = new NavigationBarTransitions(this);
&&&&&&& mCameraDisabledByDpm = isCameraDisabledByDpm();
&&&&&&& watchForDevicePolicyChanges();
其中,mBarTransitions = new NavigationBarTransitions(this)中实例化了一个大用于布局的过渡的实例,按键布局作为参数传递到该类中,查看NavigationBarTransitions类的源码:
位置:frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarTransitions.java
&public NavigationBarTransitions(NavigationBarView view) {
&&&&&&& super(view, R.drawable.nav_background);
&&&&&&& mView =
&&&&&&& mBarService = IStatusBarService.Stub.asInterface(
&&&&&&&&&&&&&&& ServiceManager.getService(Context.STATUS_BAR_SERVICE));
&& &看super(view, R.drawable.nav_background)代码,可以知道该类的构造函数调用了其父类的构造函数,其中,NavigationBarView实例和一个图片的Id作为参数传到该类的父类的构造函数中,进入NavigationBarTransitions类的父类,查看代码:
位置:frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java
public BarTransitions(View view, int gradientResourceId) {
&&&&&&& mTag = &BarTransitions.& + view.getClass().getSimpleName();
&&&&&&& mView =
&&&&&&& mBarBackground = new BarBackgroundDrawable(mView.getContext(), gradientResourceId);
&&&&&&& if (HIGH_END) {
&&&&&& &&& &Log.i(&Garment27&, &BarTransitions---HIGH_END&);
&&&&&&&&&&& mView.setBackground(mBarBackground);
从其构造函数可以看到,mView.setBackground(mBarBackground)这段代码就是把传入的图片设置成为按键布局的背景(在Launcher3中,该图片是一张透明的图片,所以得到的背景是透明的)
尝试把mView.setBackground(mBarBackground)这段代码屏蔽了,然后按键布局就只显示&color name=&system_bar_background_opaque&&#&/color&中定义的颜色,上面的statusbar和下面的虚拟按键布局的背景设置是共用一套的背景,是因为两个布局都是有一个过渡类,大家都是继承BarTransitions类。
其实,虚拟按键布局的背景颜色是会有一个过度的,在Launcher界面中,虚拟按键布局背景图是显示的是透明的图片,当我们进入到某一个应用中的时候,背景图就会过渡为黑色的背景。其中的代码是如何实现的,还有待研究。
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:7459次
排名:千里之外
原创:18篇
(1)(2)(1)(2)(3)(5)(4)}

我要回帖

更多关于 小米手机虚拟按键 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信