Discuz! Board

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 5|回复: 3
打印 上一主题 下一主题

把出口整体下移动

[复制链接]

1198

主题

2060

帖子

7058

积分

超级版主

Rank: 8Rank: 8

积分
7058
跳转到指定楼层
楼主
发表于 2016-4-22 15:27:11 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
试图修改viewrootimpl.java如下参数
//zcfdebug-- 20160422            mAttachInfo.mWindowTop = frame.top;
            mAttachInfo.mWindowTop = frame.top+960;        //zcfdebug++ 20160422

结果失败。
回复

使用道具 举报

1198

主题

2060

帖子

7058

积分

超级版主

Rank: 8Rank: 8

积分
7058
沙发
 楼主| 发表于 2016-4-22 19:41:27 | 只看该作者
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:
回复 支持 反对

使用道具 举报

1198

主题

2060

帖子

7058

积分

超级版主

Rank: 8Rank: 8

积分
7058
板凳
 楼主| 发表于 2016-4-22 20:54:21 | 只看该作者
//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
回复 支持 反对

使用道具 举报

1198

主题

2060

帖子

7058

积分

超级版主

Rank: 8Rank: 8

积分
7058
地板
 楼主| 发表于 2016-4-22 22:06:51 | 只看该作者
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
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Comsenz Inc.

GMT+8, 2025-12-15 02:04 , Processed in 0.011404 second(s), 7 queries , Apc On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表