根据屏幕分辨率,我将图像添加到屏幕。因此,根据屏幕分辨率,我添加适合尺寸的图像。这是否落入任何设计模式?还是有更适合这种要求的设计模式?根据屏幕分辨率加载图像的设计模式
ImageFactory.getBitmap();
public static Bitmap getBitmap(){
if(screenWidth == 360 && screenHeight== 480){
return new Bitmap("360480.bmp");
}
else {
return new Bitmap("320240.bmp");
}
}