如何更改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 (将#修改为@)