Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
386 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 Reply

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...