免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2510 | 回复: 0
打印 上一主题 下一主题

Android屏幕分辨率不匹配 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-12-20 09:44 |只看该作者 |倒序浏览

当将Android移植到不同分辨率的产品上,如果不作修改,大多情况下可以正常运行。但是有时候会出现在睡眠唤醒后,锁屏的界面与新的液晶屏分辩率不配配的情况。

需要修改的文件是:

frameworks/base/core/java/android/content/res/CompatibilityInfo.java

内容如下:

  1. /**

  2.   * CompatibilityInfo class keeps the information about compatibility mode that the application is

  3.   * running under.

  4.   *

  5.   *  {@hide}

  6.   */

  7.  public class CompatibilityInfo {

  8.      private static final boolean DBG = false;

  9.      private static final String TAG = "CompatibilityInfo";



  10.      /** default compatibility info object for compatible applications */

  11.      public static final CompatibilityInfo DEFAULT_COMPATIBILITY_INFO = new CompatibilityInfo() {

  12.          @Override

  13.          public void setExpandable(boolean expandable) {

  14.              throw new UnsupportedOperationException("trying to change default compatibility info");

  15.          }

  16.      };



  17.      /**

  18.       * The default width of the screen in portrait mode.

  19.       */

  20.      public static final int DEFAULT_PORTRAIT_WIDTH = 480;



  21.      /**

  22.       * The default height of the screen in portrait mode.

  23.       */

  24.      public static final int DEFAULT_PORTRAIT_HEIGHT = 800;
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP