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
效果图:
![效果图](https://private-user-images.githubusercontent.com/13990136/294444028-00306427-8493-4af3-aa2c-f1a02df5e769.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxNjU3MjIsIm5iZiI6MTcyNjE2NTQyMiwicGF0aCI6Ii8xMzk5MDEzNi8yOTQ0NDQwMjgtMDAzMDY0MjctODQ5My00YWYzLWFhMmMtZjFhMDJkZjVlNzY5LmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEyVDE4MjM0MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWMwMDYyYmNlNzNhZmMwNDIyZGQ4M2NlN2YxM2NjYTA2NGJhMmRmYzM3OGVkZDk4MjZkMGYzMzgzZTc3NmZjNGImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.-mK2O1a3z19Pb974b0LGij5YJI4ClbkP33Gz3YDDM6U)
修改代码:
找到
navigationBarPosition
方法,原方法的内容:修改后的方法内容:
编译:
输出:
将输出内容替换到板子里:
重启即可
The text was updated successfully, but these errors were encountered: