Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
409 views
in Technique[技术] by (71.8m points)

android - Graphic dimensions for hdpi/ldpi/mdpi

I have a button graphic with dimensions 300*90.How must be the dimensions for hdpi/mdpi/ldpi?Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Google suggests using

3 : 4 : 6 : 8 : 12 : 16 scaling ratios for

ldpi : mdpi : hdpi : xhdpi : xxhdpi : xxxhdpi accordingly. Example:

  • 36x36 for low-density
  • 48x48 for medium-density
  • 72x72 for high-density
  • 96x96 for extra high-density
  • 144x144 for extra-extra-high-density
  • 192x192 for extra-extra-extra-high-density

In your example, if mentioned button sizes are for hdpi, correct dimensions should be:

  • 150x45 ldpi
  • 200x60 mdpi
  • 300x90 hdpi
  • 400x120 xhdpi
  • 600x180 xxhdpi
  • 800x240 xxxhdpi

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...