記錄一下遇到過的問題,沒有記錄回頭一看,什麼都想不起來…
魅族16s pro 長按輸入框菜單按鈕被擋住
小內存手機查看大圖OOM
public static boolean isLowMemory(){
int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024 / 1024);
if (maxMemory < 300) {
return true;
}
return false;
}
//針對小內存手機特別縮放
RequestOptions options = new RequestOptions().
if (isLowMemory()) {
options.override(getScreenWidth(context), getScreenHeight(context));
} else {
options.override(Target.SIZE_ORIGINAL, Target.SIZE_ORIGINAL);
}
Glide.with(context).load(url).apply(options).into(imageView);