eclipse 模拟器的窗口比手机屏幕大

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7777475/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 17:10:50  来源:igfitidea点击:

The window of the Emulator is too big than a mobile screen

androideclipse

提问by Malloc

i have make a small example to test my Android environment, when i launch the execution on the AVD, it looks too big(as if it is a tablet screen). How can i fix the size so that it look like a mobile screen?

我做了一个小例子来测试我的 Android 环境,当我在 AVD 上启动执行时,它看起来太大了(好像它是一个平板电脑屏幕)。如何修复尺寸使其看起来像移动屏幕?

enter image description here

在此处输入图片说明

采纳答案by MKJParekh

To Set the Sizeof the Emulator You can do this,

设置模拟器的大小你可以这样做,

    Window -> Android SDK and AVD Manager 
    -> Select the virtual device you are using 
    -> Click on Edit -> Skin

    SELECT : Resolution and give the Height and Width say 320 X 480

You Should also give Densityin

你也应该给密度

        Window -> Android SDK and AVD Manager 
        -> Select the virtual device you are using 
        -> Click on Edit -> Hardware 

        SELECT : Abstracted LCD Density and Give Values
        i.e. 240X320 = 120, 320X480 = 160 and 480X800 = 240

回答by Christian Strang

  1. In Android Studio: click "Run" -> "Edit Configurations.."
  2. On the left side select your current app (its probably selected already)
  3. click on the "Emulator" tab
  4. check "Additional command line options:" and write "-scale 0.75" (for 75% percent of the original size, use 0.5 for 50%, etc.)
  5. Apply your changes, click "ok" and run your emulator
  1. 在 Android Studio 中:单击“运行”->“编辑配置..”
  2. 在左侧选择您当前的应用程序(它可能已经被选中)
  3. 单击“模拟器”选项卡
  4. 检查“附加命令行选项:”并写入“-scale 0.75”(原始大小的 75%,使用 0.5 表示 50% 等)
  5. 应用您的更改,单击“确定”并运行您的模拟器

回答by Yashwanth Kumar

Window -> Android SDK and AVD Manager -> Select the virtual device you are using -> Click on Edit -> Change the skin type to the required theme.

窗口 -> Android SDK 和 AVD 管理器 -> 选择您正在使用的虚拟设备 -> 点击编辑 -> 将皮肤类型更改为所需的主题。

HTH.

哈。

回答by adatapost

You can set screen size while launching an emulator. Window-> Android SDK and AVD Manager-> Select the virtual device-> Start-> Check the Scale display to real size-> Screen size (in) : 5

您可以在启动emulator. Window-> Android SDK and AVD Manager-> 选择virtual device-> Start-> 检查Scale display to real size-> 屏幕尺寸(英寸):5

回答by Jakes

Open the Android SDK Manager. Choose your AVD from the list of virtual devices. Click "EDIT" Try changing the skin to HVGA or something.

打开 Android SDK 管理器。从虚拟设备列表中选择您的 AVD。单击“编辑”尝试将皮肤更改为 HVGA 或其他内容。

Or if you are running the AVD via eclipse you can even try out the below

或者,如果您通过 eclipse 运行 AVD,您甚至可以尝试以下操作

  • Take Run -> Run Configurations
  • Move to the target tab and add the following line to 'Additional Emulator Commmand Line Options'

              -scale 0.7
    
  • 运行 -> 运行配置
  • 移动到目标选项卡并将以下行添加到“其他仿真器命令行选项”

              -scale 0.7
    

I hope this works for you

我希望这对你有用