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(); }