I want to put the Navigation Bar (has system soft keys like back, home and menu. not Navigation Drawer!) on the (right) side, like below, by editing AOSP.
+-----
Navigation Bar can be placed on right side by editing PhoneWindowManager.java and navigation_bar.xml.
Set mNavigationBarOnBottom
to false in PhoneWindowManager then the following code will run.
// PhoneWindowManager.java
// if mNavigationBarOnBottom = false
// Landscape screen; nav bar goes to the right
int left = displayWidth - mNavigationBarWidthForRotation[displayRotation];
mTmpNavigationFrame.set(left, 0, displayWidth, displayHeight);
mStableRight = mStableFullscreenRight = mTmpNavigationFrame.left;
if (navVisible) {
mNavigationBar.showLw(true);
mDockRight = mTmpNavigationFrame.left;
mRestrictedScreenWidth = mDockRight - mDockLeft;
} else {
// We currently want to hide the navigation UI.
mNavigationBar.hideLw(true);
}
if (navVisible && !mNavigationBar.isAnimatingLw()) {
// If the nav bar is currently requested to be visible,
// and not in the process of animating on or off, then
// we can tell the app that it is covered by it.
mSystemRight = mTmpNavigationFrame.left;
}
This creates the frame for navigation bar on right instead of bottom, now layout needs to be edited to display system buttons vertically(navigation_bar.xml).
~
~