Commit 75a7604c authored by mengcuiguang2's avatar mengcuiguang2

添加猜歌关闭恢复界面逻辑

parent 837407fd
......@@ -9,6 +9,8 @@ import androidx.annotation.Nullable
import androidx.fragment.app.Fragment
import com.bytedance.sdk.dp.*
import com.mints.helivideo.R
import com.mints.helivideo.common.AppConfig
import com.mints.helivideo.common.Constant
import com.mints.helivideo.manager.DPHolder
import com.mints.helivideo.ui.fragment.base.LazyLoadBaseFragment
import com.mints.helivideo.utils.LogUtil
......@@ -31,19 +33,39 @@ class MusicFragment : LazyLoadBaseFragment() {
if (DPSdk.isStartSuccess()) {
//初始化draw组件
initDrawWidget()
mDrawFragment = mIDPWidget!!.getFragment()
mDrawFragment = mIDPWidget?.getFragment()
getSupportFragmentManager().beginTransaction()
.replace(R.id.draw_style1_frame, mDrawFragment!!)
.commitAllowingStateLoss();
}
}
override fun onFragmentResume() {
super.onFragmentResume()
mIDPWidget?.resumeForWatchTogether()
if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_TWO) {
mIDPWidget?.fragment?.onResume()
mIDPWidget?.fragment?.userVisibleHint = true
}
}
override fun onFragmentPause() {
super.onFragmentPause()
mIDPWidget?.pauseForWatchTogether()
mIDPWidget?.fragment?.onPause()
mIDPWidget?.fragment?.userVisibleHint = false
}
override fun onHiddenChanged(hidden: Boolean) {
super.onHiddenChanged(hidden)
mIDPWidget?.fragment?.onHiddenChanged(hidden)
}
override fun setUserVisibleHint(isVisibleToUser: Boolean) {
super.setUserVisibleHint(isVisibleToUser)
// dpWidget?.fragment?.userVisibleHint = isVisibleToUser
}
private fun initDrawWidget() {
......@@ -53,7 +75,7 @@ class MusicFragment : LazyLoadBaseFragment() {
).liveNativeAdCodeId("947474068")
.adOffset(0) //单位 dp,为 0 时可以不设置
.quizMode(1)
.hideClose(false, null)
.hideClose(true, null)
.listener(object : IDPDrawListener() {
override fun onDPRefreshFinish() {
LogUtil.d(TAG,
......
......@@ -129,7 +129,7 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
readyGo(FeedbackActivity::class.java)
}
R.id.ll_contactus -> {
(requireActivity() as MainActivity).backPhoneDialog()
// (requireActivity() as MainActivity).backPhoneDialog()
}
R.id.ll_my_payrecord -> {
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment