Image size for ActionBarSherlock background

给你一囗甜甜゛ 提交于 2019-12-11 06:38:08

问题


If I were to get an art asset made intended for use as the background of an ActionBar, what size (in pixels) should I request? Everything I have found referencing the size of an ActionBar has been in dp, so I'm unsure what would be the best absolute size to go with for the actual .png file. Thanks!


回答1:


The action bar can be 40, 48, or 56 dp in height depending on configuration. This means that because of how Android scales things by density there are 9 different absolute pixel heights. The width varies depending on the device, of course.

Your best bet is to use 9-patch drawables or create the drawable using a shape XML so that it can adapt to the nearly infinite number of configurations of devices.



来源:https://stackoverflow.com/questions/11371395/image-size-for-actionbarsherlock-background

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!