【发布时间】:2012-02-10 07:20:29
【问题描述】:
我有一个带有1280*800 的平板电脑motorola xoom 我在我的项目的drawable 文件夹中有一个图像,当我检查该图像的大小时,它显示1280*755 但是当我在我的项目中使用这个图像时。
并调试它以了解它显示853*503 的大小,显然它不适合平板电脑。我在这里也附上了图片。
我通过以下代码获取宽度和高度。
BitmapDrawable bd=(BitmapDrawable)this.getResources().getDrawable(R.drawable.fish_normal);
int height=bd.getBitmap().getHeight();
int width=bd.getBitmap().getWidth();
【问题讨论】:
-
把图片放到drawable-mdpi文件夹中。
标签: android resolution tablet