去掉短剧页面的顶部状态栏,修复闪退bug
This commit is contained in:
parent
0a70cc027f
commit
3effb630c5
@ -1,5 +1,7 @@
|
|||||||
package com.yunbao.main.activity;
|
package com.yunbao.main.activity;
|
||||||
|
|
||||||
|
import android.view.Window;
|
||||||
|
import android.view.WindowManager;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
|
|
||||||
import androidx.fragment.app.FragmentManager;
|
import androidx.fragment.app.FragmentManager;
|
||||||
@ -25,8 +27,10 @@ public class MainHomeCommunityActivity extends AbsActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void main() {
|
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();//获取管理器
|
FragmentManager FM = getSupportFragmentManager();//获取管理器
|
||||||
FragmentTransaction FT = FM.beginTransaction();//获取启动器
|
FragmentTransaction FT = FM.beginTransaction();//获取启动器
|
||||||
FT.replace(R.id.fragment, communityVideoFragment);//替换碎片
|
FT.replace(R.id.fragment, communityVideoFragment);//替换碎片
|
||||||
|
@ -204,6 +204,10 @@ public class MainHomeCommunityVideoFragment extends BaseFragment {
|
|||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
|
if (timer != null) {
|
||||||
|
timer.cancel();
|
||||||
|
timer = null;
|
||||||
|
}
|
||||||
getActivity().finish();
|
getActivity().finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user