From cbb88109494ffc7916f6639c20ce05c0cec941a9 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期三, 07 四月 2021 15:07:45 +0800 Subject: [PATCH] 3.9.1bug修复 --- BuWanVideo/src/com/weikou/beibeivideo/ui/BaseActivity.java | 20 ++++++++++++++++---- 1 files changed, 16 insertions(+), 4 deletions(-) diff --git a/BuWanVideo/src/com/weikou/beibeivideo/ui/BaseActivity.java b/BuWanVideo/src/com/weikou/beibeivideo/ui/BaseActivity.java index 7d28436..4458dc8 100644 --- a/BuWanVideo/src/com/weikou/beibeivideo/ui/BaseActivity.java +++ b/BuWanVideo/src/com/weikou/beibeivideo/ui/BaseActivity.java @@ -74,12 +74,24 @@ @Override public Resources getResources() { Resources res = super.getResources(); -// if (res.getConfiguration().fontScale != 1) {//闈為粯璁ゅ�� Configuration newConfig = new Configuration(); newConfig.setToDefaults();//璁剧疆榛樿 - newConfig.fontScale = 1.1f; - res.updateConfiguration(newConfig, res.getDisplayMetrics()); -// } + + try { + if (Build.BRAND.toLowerCase().equalsIgnoreCase("xiaomi")) { + if (res.getConfiguration().fontScale != 1.1) { + newConfig.fontScale = 1.1f; + res.updateConfiguration(newConfig, res.getDisplayMetrics()); + } + } else { + if (res.getConfiguration().fontScale != 1) { + newConfig.fontScale = 1.0f; + res.updateConfiguration(newConfig, res.getDisplayMetrics()); + } + } + } catch (Exception e) { + res.updateConfiguration(newConfig, res.getDisplayMetrics()); + } return res; } -- Gitblit v1.8.0