Android 3.2的相同的布局所有页面 [英] Android 3.2 same layout for all screens

查看:209
本文介绍了Android 3.2的相同的布局所有页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设置以下布局配置我的应用程序

i set following layout configuration for my app

小,正常,大,超大的屏幕布局都很好,Android 1.5的3.1。在Android 3.2的所有屏幕即

small,normal,large,xlarge screen layouts are fine for android 1.5 to 3.1. In android 3.2 all screens i.e


  • 小( 320×426 的密度为160),

  • 正常( 320×470 的密度为160),

  • 大( 480 * 640 的密度为160),

  • XLARGE( 720×960 的密度为240)

  • small (320 x 426 with density 160),
  • normal (320 x 470 with density 160),
  • large (480 x 640 with density 160) ,
  • xlarge (720 x 960 with density 240)

只需布局sw320dp 。有Android 3.2版所需的任何额外的配置。

only takes layout-sw320dp . Is there any additional configuration required for android 3.2

请注意:我使用的Eclipse与Android插件

note: i'm using eclipse with android plugin

推荐答案

随着Android 3.2的推出布局管理的变化(见的 http://developer.android.com/sdk/android-3.2.html#api &放大器;的http://android-developers.blogspot.com/2011/07/new-tools-for-managing-screen-sizes.html)最具体的布局应选择所使用的设备,在这种情况下,布局sw600dp应选择一个720×960的设备。

With the layout management changes introduced in Android 3.2 (See http://developer.android.com/sdk/android-3.2.html#api & http://android-developers.blogspot.com/2011/07/new-tools-for-managing-screen-sizes.html) the most specific layout should be selected for the device being used. In this case layout-sw600dp should be selected for a 720 x 960 device.

有关Android 3.2的,你还需要指定屏幕尺寸您的应用程序在manifest文件中使用元素支持。
http://developer.android.com/guide/practices/screens_support.html#DeclaringScreenSizeSupport
 的http://developer.android.com/guide/topics/manifest/supports-screens-element.html

For Android 3.2, you also need to specify which screen sizes your app supports in the manifest file using the element. http://developer.android.com/guide/practices/screens_support.html#DeclaringScreenSizeSupport http://developer.android.com/guide/topics/manifest/supports-screens-element.html

这很可能导致您的问题。

This is likely causing your issue.

这篇关于Android 3.2的相同的布局所有页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆