Discuz! Board

标题: 把出口整体下移动 [打印本页]

作者: zangcf    时间: 2016-4-22 15:27
标题: 把出口整体下移动
试图修改viewrootimpl.java如下参数
//zcfdebug-- 20160422            mAttachInfo.mWindowTop = frame.top;
            mAttachInfo.mWindowTop = frame.top+960;        //zcfdebug++ 20160422

结果失败。

作者: 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




欢迎光临 Discuz! Board (http://47.89.242.157:9000/bbs/discuz/) Powered by Discuz! X3.2