【问题标题】:Android 4.0 AVD tablet with phone layout like Nexus 7Android 4.0 AVD 平板电脑,手机布局类似 Nexus 7
【发布时间】:2014-03-05 15:21:25
【问题描述】:

我创建了模拟 7" 平板电脑的 AVD,但它在底部有状态栏,就像在 this image 上一样。 我想在this image 上设置电话布局(右侧按钮除外)- 怎么做? 我基于通用皮肤(QVGA、WSVGA 和 WXGA800-7in)编写了自己的皮肤,代码如下:

parts {
    portrait {
        background {
            image   background_port.png
        }
    }
    landscape {
        background {
            image   background_land.png
        }
    }

    device {
        display {
            width   600
            height  1024
            x       0
            y       0
        }
    }

}

layouts {

    portrait {
        width     654
        height    1076
        color     0xe0e0e0
        event     EV_SW:0:1


        part1 {
            name    portrait
            x       0
            y       0
        }

        part2 {
            name    landscape
            x       1400
            y       0
        }

        part3 {
            name      device
            x         26
            y         29
        }
    }

    landscape {
        width     1076
        height    654
        color     0xe0e0e0
        event     EV_SW:0:0

        dpad-rotation 3

        part1 {
            name    portrait
            x       1400
            y       0
        }

        part2 {
            name    landscape
            x       0
            y       0
        }

        part3 {
            name    device
            x       29
            y       1050
            rotation  3
        }
    }

}

keyboard {
    charmap qwerty2
}

network {
    speed  full
    delay  none
}

和配置文件:

avd.ini.encoding=ISO-8859-1
hw.lcd.density=160
hw.dPad=no
sdcard.size=50M
hw.cpu.arch=arm
hw.device.hash=-612842536
disk.dataPartition.size=200M
skin.dynamic=no
skin.path=platforms\android-14\skins\SVGA_kp
hw.keyboard.lid=no
hw.keyboard=no
hw.cpu.model=cortex-a8
hw.ramSize=512
tag.id=default
tag.display=Default
hw.device.manufacturer=User
hw.sdCard=yes
hw.mainKeys=yes
hw.accelerometer=yes
skin.name=SVGA_kp
abi.type=armeabi-v7a
hw.trackBall=no
hw.device.name=IdeaTab A1000
hw.sensors.proximity=yes
hw.battery=yes
image.sysdir.1=system-images\android-14\armeabi-v7a\
hw.audioInput=yes
hw.sensors.orientation=no
hw.camera.front=none
hw.gps=yes
snapshot.present=true
vm.heapSize=32

模拟器以纵向模式启动,但操作系统有底部状态栏,就像在 Honeycomb 中一样。

【问题讨论】:

    标签: android avd


    【解决方案1】:

    我找到了解决方案。我认为模拟器根据 AVD 分辨率和密度计算显示尺寸。之前,我在 AVD 的 config.ini 中更改了 hw.lcd.density,但它没有用。在 skin 文件夹中,我找到了包含皮肤指定参数的 hardware.ini 文件,我认为这些参数会覆盖 AVD 的 config.ini 中的设置。

    解决方案

    如果您为 AVD 设置了高屏幕分辨率(即800x1280),请选择具有高显示密度的皮肤。或者,在[SDK location]/platforms/android-[version]/skins/[skin-name]/hardware.ini 中将hw.lcd.density 参数设置为更高的值(即300)。为您的 AVD 选择合适的皮肤,模拟器应在手机模式下加载 Android。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-10-31
      相关资源
      最近更新 更多