How to set a density in emulator android studio

守給你的承諾、 提交于 2020-12-13 04:13:27

问题


I would like to create an emulator of Samsung Galaxy XCover4S (720 x 1280 px (5.00") 294ppi 64.6% screen-to-body ratio). However I found only how to set a predefined densities (like 120,240,320) and many more densities (ppi) in .android\avd\~~\config. Is there a posibility to set it as 294?

Greetings


回答1:


No. It is not possible to set the density to 294.

You can only choose between the following DPIs:
120, 160, 213, 240, 280, 320, 360, 400, 420, 480, 560, 640


To set the density, do the following:
After creating the emulator, open ~/.android/avd/my_avd/config.ini and append:
hw.lcd.density=560




回答2:


I think you need to create a custom emulator skin, check this.



来源:https://stackoverflow.com/questions/58394146/how-to-set-a-density-in-emulator-android-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!