From f8a5683d08f2e6f832578b2fd5c795888ddcae64 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期六, 20 二月 2021 19:30:55 +0800
Subject: [PATCH] 极光推送集成,PPTV播放页某些图片无法显示的bug修改

---
 BuWanVideo/src/com/weikou/beibeivideo/ui/main/MainActivity.java |   42 ++----------------------------------------
 1 files changed, 2 insertions(+), 40 deletions(-)

diff --git a/BuWanVideo/src/com/weikou/beibeivideo/ui/main/MainActivity.java b/BuWanVideo/src/com/weikou/beibeivideo/ui/main/MainActivity.java
index 7fcad8b..f83a0be 100644
--- a/BuWanVideo/src/com/weikou/beibeivideo/ui/main/MainActivity.java
+++ b/BuWanVideo/src/com/weikou/beibeivideo/ui/main/MainActivity.java
@@ -127,26 +127,7 @@
 
         exitDialog = exitDialogBuilder.create();
         exitDialog.setCanceledOnTouchOutside(true);
-        /*
-         * 璁$畻鐘舵�佹爮楂樺害骞惰缃�
-         */
-        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
-            Window window = getWindow();
-            window.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS,
-                    WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
-            int result = 0;
-            int resourceId = getResources().getIdentifier("status_bar_height",
-                    "dimen", "android");
-            if (resourceId > 0) {
-                result = getResources().getDimensionPixelSize(resourceId);
-            }
-            LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,
-                    result);
-            findViewById(R.id.v_status_bar).setLayoutParams(params);
-            findViewById(R.id.v_status_bar).setVisibility(View.VISIBLE);
-        } else {
-            findViewById(R.id.v_status_bar).setVisibility(View.GONE);
-        }
+        initStatusBar();
         // 灏唅mei mac lat lng瀛樺叆sharedpreference涓�
         SharedPreferences mPre = getSharedPreferences("user",
                 Context.MODE_PRIVATE);
@@ -183,26 +164,7 @@
         iv_taobao.setOnClickListener(this);
         iv_red_dot = findViewById(R.id.iv_red_dot);
         fl_right_ad = findViewById(R.id.fl_right_ad);
-
-        /*
-         * 璁$畻鐘舵�佹爮楂樺害骞惰缃�
-         */
-        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
-            Window window = getWindow();
-            window.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS,
-                    WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
-            int result = 0;
-            int resourceId = getResources().getIdentifier("status_bar_height",
-                    "dimen", "android");
-            if (resourceId > 0) {
-                result = getResources().getDimensionPixelSize(resourceId);
-            }
-            LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,
-                    result);
-            findViewById(R.id.v_status_bar).setLayoutParams(params);
-        } else {
-            findViewById(R.id.v_status_bar).setVisibility(View.GONE);
-        }
+        initStatusBar();
 
         initialer.run();
 

--
Gitblit v1.8.0