记录一下遇到过的问题,没有记录回头一看,什么都想不起来…
魅族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);