From 3effb630c5f4b39bb30b0995c8de97d353298c21 Mon Sep 17 00:00:00 2001 From: hch <16607480311@163.com> Date: Tue, 23 Jan 2024 17:49:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E7=9F=AD=E5=89=A7=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E7=9A=84=E9=A1=B6=E9=83=A8=E7=8A=B6=E6=80=81=E6=A0=8F?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E5=A4=8D=E9=97=AA=E9=80=80bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yunbao/main/activity/MainHomeCommunityActivity.java | 6 +++++- .../main/fragment/MainHomeCommunityVideoFragment.java | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/main/src/main/java/com/yunbao/main/activity/MainHomeCommunityActivity.java b/main/src/main/java/com/yunbao/main/activity/MainHomeCommunityActivity.java index 084ac2870..6eb1db028 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainHomeCommunityActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainHomeCommunityActivity.java @@ -1,5 +1,7 @@ package com.yunbao.main.activity; +import android.view.Window; +import android.view.WindowManager; import android.widget.LinearLayout; import androidx.fragment.app.FragmentManager; @@ -25,8 +27,10 @@ public class MainHomeCommunityActivity extends AbsActivity { @Override protected void main() { - MainHomeCommunityVideoFragment communityVideoFragment = new MainHomeCommunityVideoFragment(); + Window window = getWindow(); + window.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); + MainHomeCommunityVideoFragment communityVideoFragment = new MainHomeCommunityVideoFragment(); FragmentManager FM = getSupportFragmentManager();//获取管理器 FragmentTransaction FT = FM.beginTransaction();//获取启动器 FT.replace(R.id.fragment, communityVideoFragment);//替换碎片 diff --git a/main/src/main/java/com/yunbao/main/fragment/MainHomeCommunityVideoFragment.java b/main/src/main/java/com/yunbao/main/fragment/MainHomeCommunityVideoFragment.java index f2db90261..969bf6c31 100644 --- a/main/src/main/java/com/yunbao/main/fragment/MainHomeCommunityVideoFragment.java +++ b/main/src/main/java/com/yunbao/main/fragment/MainHomeCommunityVideoFragment.java @@ -204,6 +204,10 @@ public class MainHomeCommunityVideoFragment extends BaseFragment { @Override public void onDestroy() { super.onDestroy(); + if (timer != null) { + timer.cancel(); + timer = null; + } getActivity().finish(); }