微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何更改android第二个显示分辨率

如何解决如何更改android第二个显示分辨率

我有一个基于 android 6.0 的 LCD 条(28 英寸) 像下面 lcd bar

但我的设备有两个屏幕(前、后)

我的目标是展示不同的内容

1 次尝试:相同的内容显示
hello “hello world”前后完全一样
2 次尝试:不同的内容显示(使用 android 演示类)
front : 前面很好
rear : 后面的字体很奇怪

我检查了显示分辨率
front_resolution : 实际 1920x360,设备 1920x360,密度 1
rear_resolution:实际 1920x1080,设备 960x540,密度 2

        display.getMetrics(metrics);
        float density = metrics.density;
        

        TextView actual = (TextView) v.findViewById(R.id.actual);
        if (actual != null)
        {
            actual.setText(String.format("actual %dx%d",metrics.widthPixels,metrics.heightPixels));
        }

        TextView df = (TextView) v.findViewById(R.id.density_factor);
        if (df != null)
        {
            df.setText(String.format("%f",density));
        }

        TextView dp = (TextView) v.findViewById(R.id.device_pixels);
        if (dp != null)
        {
            dp.setText(String.format("device %dx%d",((int) ((float) metrics.widthPixels / density)),((int) ((float) metrics.heightPixels / density))));
        }

  • 检查转储系统
shell@YoungFeel:/ $ dumpsys display  | grep mBasedisplayInfo
    mBasedisplayInfo=displayInfo{"Built-in Screen",uniqueId "local:0",app 1920 x 360,real 1920 x 360,largest app 1920 x 360,smallest app 1920 x 360,mode 1,defaultMode 1,modes [{id=1,width=1920,height=360,fps=169.13202}],colorTransformId 1,defaultColorTransformId 1,supportedColorTransforms [{id=1,colorTransform=0}],rotation 0,density 160 (159.89508 x 160.42105) dpi,layerStack 0,appVsyncOff 0,presDeadline 6912541,type BUILT_IN,state ON,FLAG_SECURE,FLAG_SUPPORTS_PROTECTED_BUFFERS}
    mBasedisplayInfo=displayInfo{"HDMI Screen",uniqueId "local:1",app 1920 x 1080,real 1920 x 1080,largest app 1920 x 1080,smallest app 1920 x 1080,mode 5,defaultMode 5,modes [{id=5,height=1080,fps=60598.715}],colorTransformId 5,defaultColorTransformId 5,supportedColorTransforms [{id=5,density 320 (320.0 x 320.0) dpi,layerStack 4,presDeadline 1016502,type HDMI,FLAG_SUPPORTS_PROTECTED_BUFFERS,FLAG_PRESENTATION}

如何让它们看起来一样?
请给我任何线索

提前致谢

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。