This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Journey To Enterprise Agility and have Daryl Kulak & Hong Li on-line!
See this thread for details.
Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Device indipendant pixel not working fine  RSS feed

 
Ranch Hand
Posts: 1288
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
below is my main xml file



i have several Virtual Devices.i used dp for height and width.but when i run this in several devices it shows the button in different sizes.please find the attachment.
 
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

sam liyanage wrote:
i have several Virtual Devices.i used dp for height and width.but when i run this in several devices it shows the button in different sizes.please find the attachment.



. At runtime, the system transparently handles any scaling of the dp units, as necessary, based on the actual density of the screen in use. The conversion of dp units to screen pixels is simple: px = dp * (dpi / 160). For example, on a 240 dpi screen, 1 dp equals 1.5 physical pixels


http://developer.android.com/guide/practices/screens_support.html
 
sam liya
Ranch Hand
Posts: 1288
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to below url when we use dp,it shows same size in different screens.please find the attached screenshot.

http://www.youtube.com/watch?v=gd_7wKZiuW0&index=35&list=PLonJJ3BVjZW6hYgvtkaWvwAVvOFB7fkLa
resolution.png
[Thumbnail for resolution.png]
file
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!