对于ActionBarSherlock背景图像尺寸

对于ActionBarSherlock背景图像尺寸

本文介绍了对于ActionBarSherlock背景图像尺寸的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我要得到一个艺术资产作了拟用作动作条的背景下,应我要求什么大小(像素)?一切我已经找到引用的动作条的规模一直在DP,所以我不能确定这将是最好的绝对规模去与实际.png文件。谢谢!

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!

推荐答案

操作栏可以是40,48,或56 DP高度取决于配置。这意味着,由于Android的如何通过密度秤的东西有9个不同的绝对像素高度。的宽度取决于场的设备上,

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.

您最好的选择是使用 9补丁可绘或使用创建绘制一个形状XML 使之能适应的装置的结构的几乎无限数目

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.

这篇关于对于ActionBarSherlock背景图像尺寸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-24 18:36