http://blog.youkuaiyun.com/shadow066/article/details/46342859
http://blog.youkuaiyun.com/devilkin64/article/details/19415717
http://blog.youkuaiyun.com/iwuyuetian/article/details/50294985
上面这些都是参考网址:
以前都没有遇到过今天记录一下,万一忘了好回来看下,我用的小米手机一直没有出现问题,看网上资料说是:
加了:
if (!MyApplication.isMIUIRom()){
alterDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_TOAST);
}
判断是不是小米系统
public static boolean isMIUIRom() {
String property = getSystemProperty("ro.miui.ui.version.name");
return !TextUtils.isEmpty(property);
}
private static String getSystemProperty(String propName) {
String line;
BufferedReader input = null;
try {
Process p = Runtime.getRuntime().exec("getprop " + propName);
input = new BufferedReader(new InputStreamReader(p.getInputStream()), 1024);
line = input.readLine();
input.close();
} catch (IOException ex) {
return null;
} finally {
if (input != null) {
try {
input.close();
} catch (IOException e) {
}
}
}
return line;
}
但是在锤子手机上又出现问题!
所以最后还是判断手机类型