加载分辨率不对
图片原分辨率
从mdpi到xxxhdpi全部都放了一份还是没有用
虚心求教各位大佬
public static Bitmap getBitmap(Context context, int resId) {
BitmapFactory.Options options = new BitmapFactory.Options();
TypedValue value = new TypedValue();
context.getResources().openRawResource(resId, value);
options.inTargetDensity = value.density;
options.inScaled = false;//不缩放
Bitmap bitmap = BitmapFactory.decodeResource(context.getResources(), resId, options);
bitmap.setDensity(Bitmap.DENSITY_NONE);
return bitmap;
}
已解决