您好,
我想要得到的宽度,我被存储在绘制文件夹中的图片和高度。 这是可能的,如果是的话,请让我知道?
I want to get width and height of the image which i was stored in the drawable folder. Is this possible, if so please let me know ?
尝试
BitmapDrawable bd=(BitmapDrawable) this.getResources().getDrawable(R.drawable.icon);
int height=bd.getBitmap().getHeight();
int width=bd.getBitmap().getWidth();