锤子手机使用AlertDialog.Builder出现白屏、闪屏问题
2017-11-16 11:18
435 查看
http://blog.csdn.net/shadow066/article/details/46342859
http://blog.csdn.net/devilkin64/article/details/19415717 http://blog.csdn.net/iwuyuetian/article/details/50294985
上面这些都是参考网址:
以前都没有遇到过今天记录一下,万一忘了好回来看下,我用的小米手机一直没有出现问题,看网上资料说是:
加了:
判断是不是小米系统
public static boolean isMIUIRom() {
String property = getSystemProperty("ro.miui.ui.version.name");
return !TextUtils.isEmpty(property);
}
所以最后还是判断手机类型
http://blog.csdn.net/devilkin64/article/details/19415717 http://blog.csdn.net/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; }但是在锤子手机上又出现问题!
所以最后还是判断手机类型
相关文章推荐
- 在Android6.0中使用AlertDialog.Builder出现的问题
- 使用AlertDialog.Builder的时候出现错误:unable to add window --token null is not for an application的解决办法
- AlertDialog.Builder()的参数问题
- AlertDialog.Builder的使用
- 使用cordova插件解决ionic页面在手机上启动出现黑频问题
- 关于Android中AlertDialog的使用问题:点击AlertDialog外部不消失的代码操作
- Android ActivityGroup的子类中调用AlertDialog出现问题
- Android中弹窗AlertDialog.Builder使用方法
- android—使用AlertDialog.Builder对话框
- 关于4.X系统使用安卓5.0Material风格AlertDialog全屏问题
- popupWindow使用timePicker时点击出现闪屏问题的解决办法
- 在AsyncTask中使用Dialog出现的问题
- 安卓使用 AlertDialog.Builder创建单选列表对话框
- AlertDialog使用时遇到问题
- 使用AlertDialog.Builder自定义对话框
- 关于android的webview 使用的问题 JS无法正常使用 界面切换出现白屏
- 为什么要使用AlertDialog.Builder创建AlertDialog对话框
- DPF.Android.Native.Components.v2.8.1 for delphi xe6 使用DPFJAlertDialog遇到的问题
- Android 使用AlertDialog.Builder构造对话框dialog全过程
- cocos2dx 使用滚动层后在手机上运行出现问题解决方案。