How to configure device density value in AVD

2,729 views
Skip to first unread message

Dev Droid

unread,
Aug 29, 2013, 8:36:34 AM8/29/13
to android-...@googlegroups.com
Hi,

I am trying to support two devices with different densities one is 220dpi and other is 190 dpi. So when i create new AVD definitions from AVD manager, there is no option to specify the density values. I am asking this because my dimen.xml, layout xml's would differ based on these device densities. So any one has tried before defining the device densities on emulator/avd.

Help Appreciated!

Tushar

unread,
Aug 29, 2013, 12:41:51 PM8/29/13
to android-...@googlegroups.com
You can change the device density in the particular AVD's config.ini file. The property name that you'd have to change is "hw.lcd.density".  On Windows 7, the default configuration file path is C:\Users\<user>\.android\avd\<avd_name.avd\config.

Jitesh dedhiya

unread,
Aug 30, 2013, 5:08:54 AM8/30/13
to android-...@googlegroups.com
I tried this thing and later while testing on avd i found that it was still showing me the density as 160 whereas i added value as 185. So other than config.ini do we have to modify in some other areas ?


--
You received this message because you are subscribed to a topic in the Google Groups "android-platform" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-platform/_qS3QDEA1Bo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to android-platfo...@googlegroups.com.
To post to this group, send email to android-...@googlegroups.com.
Visit this group at http://groups.google.com/group/android-platform.
For more options, visit https://groups.google.com/groups/opt_out.



--
--Jitesh .V. Dedhiya---

Don't Learn To Hack but Hack To Learn

Tushar

unread,
Aug 31, 2013, 12:23:03 PM8/31/13
to android-...@googlegroups.com
Changing the config file should have done the job.  Did you make sure that you changed the config file of the same emulator that you tested?
Reply all
Reply to author
Forward
0 new messages