From b9ed091e3b607af409e30aca468958cdb08641ad Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期四, 13 一月 2022 15:04:32 +0800 Subject: [PATCH] 电话号码登录 --- app/src/main/java/com/ysvideo/zhibo/app/ui/main/HomeFragment.java | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-) diff --git a/app/src/main/java/com/ysvideo/zhibo/app/ui/main/HomeFragment.java b/app/src/main/java/com/ysvideo/zhibo/app/ui/main/HomeFragment.java index d7725db..927553f 100644 --- a/app/src/main/java/com/ysvideo/zhibo/app/ui/main/HomeFragment.java +++ b/app/src/main/java/com/ysvideo/zhibo/app/ui/main/HomeFragment.java @@ -7,15 +7,18 @@ import com.androidquery.AQuery; import com.ysvideo.zhibo.app.R; +import com.ysvideo.zhibo.app.entity.ad.AdPositionEnum; import com.ysvideo.zhibo.app.ui.mine.MyCollectionActivity; import com.ysvideo.zhibo.app.ui.video.SearchActivity; import com.ysvideo.zhibo.app.ui.video.WatchHistoryActivity; import com.ysvideo.zhibo.lib.common.RetainViewFragment; +import com.ysvideo.zhibo.library_ad.AdUtil; public class HomeFragment extends RetainViewFragment { private static final String TAG = "HomeFragment"; private AQuery mAquery; + private DYVideoFragment mDYVideoFragment; @Override public int getContentResource() { @@ -44,7 +47,15 @@ startActivity(new Intent(getContext(), SearchActivity.class)); } }); - getChildFragmentManager().beginTransaction().replace(R.id.fl_container, new DYVideoFragment()).commitAllowingStateLoss(); + +// if (AdUtil.getAdType(getContext(), AdPositionEnum.videoDetailFullVideo.name()) != null) { +// mAquery.id(R.id.ll_search).visibility(View.VISIBLE); +// } else { +// mAquery.id(R.id.ll_search).visibility(View.GONE); +// } + + mDYVideoFragment = new DYVideoFragment(); + getChildFragmentManager().beginTransaction().replace(R.id.fl_container, mDYVideoFragment).commitAllowingStateLoss(); } @Override @@ -64,11 +75,13 @@ public void setUserVisibleHint(boolean isVisibleToUser) { Log.i(TAG, "setUserVisibleHint:" + isVisibleToUser); super.setUserVisibleHint(isVisibleToUser); + mDYVideoFragment.setUserVisibleHint(isVisibleToUser); } @Override public void onHiddenChanged(boolean hidden) { Log.i(TAG, "onHiddenChanged:" + hidden); super.onHiddenChanged(hidden); + mDYVideoFragment.onHiddenChanged(hidden); } } -- Gitblit v1.8.0