Android6.0导航栏

来源:互联网 发布:柳州软件培训班 编辑:程序博客网 时间:2024/05/18 22:10

1,不显示导航栏

修改frameworks/base/core/res/res/values/dimens.xml

<!-- Height of the bottom navigation / system bar. -->
<dimen name="navigation_bar_height">0dp</dimen>
<!-- Height of the bottom navigation bar in portrait; often the same as @dimen/navigation_bar_height -->
<dimen name="navigation_bar_height_landscape">48dp</dimen>

改成0dp


2,发广播

frameworks/base/services/core/java/com/android/server/policy/ PhoneWindowManager.java 


public void onSwipeFromBottom() {Log.d(TAG, "onSwipeFromBottom");                        //if (mNavigationBar != null && mNavigationBarOnBottom) {                        //    requestTransientBars(mNavigationBar);                        //}if(PhoneWindowManager.this.mContext != null) {Log.d(TAG, "onSwipeFromBottom sendBroadcast");Intent intent = new Intent("com.toycloud.system.swipefrombottom");PhoneWindowManager.this.mContext.sendBroadcast(intent);} else {Log.d(TAG, "onSwipeFromBottom mContext == null");}                    }


命令:

1,进入frameworks/base/core/res/res目录 mm,将生成的framework_res.apk推入相应的目录;

2,进入frameworks/base目录 mm,将生成的framework.jar推入相应的目录。

3,到Android目录下make -j8

0 0