android - Emulator don't jobs correctly with dps -
i have simple layout, have 1 button.
<button android:id="@+id/button1" android:layout_width="200dp" android:layout_height="80dp" android:text="button"/>
i want see button scale correctly in different densities. created 3 emulators, different abstracted lcd density (120,160 , 240).
when run application in tree emulators, button size bigger in each emulator. if read hight , width of button in pixels can see size right.
is there problem density in emulator?
the version of android ics.
thank much.
edit.
i upload images problem. first images in 160 densities , seconds have 240.
screen_with_160_screen_home
screen_with_240_screen_home
you can see elements ara bigger in 240, home screen.
//according density differ when use dp or dip
if 200dp in 120 dpi=200×120÷160=150px if 200dp in 160 dpi=200×160÷160=200px if 200dp in 240 dpi=200×240÷160=300px
this dp/dip
auto scale
if want fixed size mean need use px
Comments
Post a Comment