We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
改变 Android 系统导航栏位置的简易教程
效果图:
修改代码:
frameworks/base/services/core/java/com/android/server/wm/DisplayPolicy.java
找到 navigationBarPosition 方法,原方法的内容:
navigationBarPosition
@NavigationBarPosition int navigationBarPosition(int displayWidth, int displayHeight, int displayRotation) { if (navigationBarCanMove() && displayWidth > displayHeight) { if (displayRotation == Surface.ROTATION_270) { return NAV_BAR_LEFT; } else if (displayRotation == Surface.ROTATION_90) { return NAV_BAR_RIGHT; } } return NAV_BAR_BOTTOM; }
修改后的方法内容:
@NavigationBarPosition int navigationBarPosition(int displayWidth, int displayHeight, int displayRotation) { return NAV_BAR_LEFT; }
编译:
make services
输出:
.../out/target/product/你的平台/system/framework/services.jar .../out/target/product/你的平台/system/framework/services.jar.bprof .../out/target/product/你的平台/system/framework/services.jar.prof
将输出内容替换到板子里:
adb push ...\services.jar /system/framework/ adb push ...\services.jar.bprof /system/framework/ adb push ...\services.jar.prof /system/framework/
重启即可
The text was updated successfully, but these errors were encountered:
No branches or pull requests
效果图:
修改代码:
找到
navigationBarPosition
方法,原方法的内容:修改后的方法内容:
编译:
输出:
将输出内容替换到板子里:
重启即可
The text was updated successfully, but these errors were encountered: