结果失败。 作者: zangcf 时间: 2016-4-22 19:41
try to move navigatiion bar to bottom fail:
PhoneWIndowManager.java:
// The navigation bar has Real Ultimate Power.
pf.left = df.left = of.left = mUnrestrictedScreenLeft;
//zcfdebug-- 20160422 pf.top = df.top = of.top = mUnrestrictedScreenTop;
pf.top = df.top = of.top = mUnrestrictedScreenTop+960;//zcfdebug++ 20160422
pf.right = df.right = of.right = mUnrestrictedScreenLeft
+ mUnrestrictedScreenWidth;
pf.bottom = df.bottom = of.bottom = mUnrestrictedScreenTop
PhoneStatusBar.java:
private WindowManager.LayoutParams getNavigationBarLayoutParams() {
WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT,
WindowManager.LayoutParams.TYPE_NAVIGATION_BAR,
0
| WindowManager.LayoutParams.FLAG_TOUCHABLE_WHEN_WAKING
| WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
| WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
| WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH
| WindowManager.LayoutParams.FLAG_SPLIT_TOUCH,
PixelFormat.TRANSLUCENT);
// this will allow the navbar to run in an overlay on devices that support this
if (ActivityManager.isHighEndGfx()) {
lp.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
}
lp.setTitle("NavigationBar");
lp.windowAnimations = 0;
lp.y=960; //zcfdebug++ 20160422
return lp;
}
all fail: 作者: zangcf 时间: 2016-4-22 20:54
//zcfdebug-- 20160422 mTmpNavigationFrame.set(0, top, displayWidth, displayHeight - overscanBottom);
top = top+960; //zcfdebug++ 2-160422
Slog.i("zcfdebug in WM","the Nav top is " + top + " before adjust" );
mTmpNavigationFrame.set(0, top, displayWidth, displayHeight - overscanBottom); //zcfdebug++ 20160422
here cuase lost navigation bar作者: zangcf 时间: 2016-4-22 22:06
and actually fix in PhoneWindowManager.java:
/** {@inheritDoc} */
@Override
public void beginLayoutLw(boolean isDefaultDisplay, int displayWidth, int displayHeight,
int displayRotation) {
displayHeight += 960; //zcfdebug++
final int overscanLeft, overscanTop, overscan