Commit 7823f573 authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 3eef1e6d
......@@ -89,26 +89,26 @@ class SplashActivity : BaseActivity() {
timer = CountDownTimerSupport(AD_TIME_OUT.toLong(), 1000)
timer!!.setOnCountDownTimerListener(object : OnCountDownTimerListener {
override fun onTick(millisUntilFinished: Long) {
// 第一次安装时,延迟加载开屏广告,因为广告sdk还未初始化完成
val firstSplash = get().getBoolean(Constant.FIRST_SPLASH, true)
if (firstSplash && millisUntilFinished == (AD_TIME_OUT - 2000).toLong()) {
AdManager.instance.splashPreLoadAll(this@SplashActivity)
get().put(Constant.FIRST_SPLASH, false)
}
if (!isFinishing) {
if (isAdSuc) return
if (SplashManager.isSuccessStatus()) {
LogUtil.d("SplashNewActivity-->", "SplashNewActivity--> ad show")
isAdSuc = true
if (mProgressBar != null) {
mProgressBar!!.setCompleteNoAnim()
}
// 跳转广告
readyGoThenKill(SplashAdActivity::class.java)
}
}
// // 第一次安装时,延迟加载开屏广告,因为广告sdk还未初始化完成
// val firstSplash = get().getBoolean(Constant.FIRST_SPLASH, true)
// if (firstSplash && millisUntilFinished == (AD_TIME_OUT - 2000).toLong()) {
// AdManager.instance.splashPreLoadAll(this@SplashActivity)
// get().put(Constant.FIRST_SPLASH, false)
// }
//
// if (!isFinishing) {
// if (isAdSuc) return
//
// if (SplashManager.isSuccessStatus()) {
// LogUtil.d("SplashNewActivity-->", "SplashNewActivity--> ad show")
// isAdSuc = true
// if (mProgressBar != null) {
// mProgressBar!!.setCompleteNoAnim()
// }
// // 跳转广告
// readyGoThenKill(SplashAdActivity::class.java)
// }
// }
}
override fun onFinish() {
......
......@@ -23,6 +23,7 @@ import com.xinfu.helivideo.mvp.model.IndexList
import com.xinfu.helivideo.mvp.model.VedioBean
import com.xinfu.helivideo.mvp.presenters.VideoPresenter
import com.xinfu.helivideo.mvp.views.VideoView
import com.xinfu.helivideo.ui.activitys.MainActivity
import com.xinfu.helivideo.ui.activitys.VipActivity
import com.xinfu.helivideo.ui.activitys.base.BaseActivity
import com.xinfu.helivideo.ui.adapter.VideoEpisodeAdapter
......@@ -173,7 +174,7 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
val bundle = Bundle()
bundle.putString(VipActivity.VEDIO_ID, mVedioBean!!.vedioId.toString())
bundle.putString(VipActivity.THIRD_ID, mVedioBean!!.thirdId)
readyGo(VipActivity::class.java, bundle)
readyGo(MainActivity::class.java, bundle)
}
}
......
......@@ -18,6 +18,7 @@ import com.xinfu.helivideo.mvp.model.VedioBean
import com.xinfu.helivideo.mvp.model.VideoMultiItemEntity
import com.xinfu.helivideo.mvp.presenters.VideoPresenter
import com.xinfu.helivideo.mvp.views.VideoView
import com.xinfu.helivideo.ui.activitys.MainActivity
import com.xinfu.helivideo.ui.activitys.VipActivity
import com.xinfu.helivideo.ui.activitys.base.BaseActivity
import com.xinfu.helivideo.ui.adapter.VideoEpisodeAdapter
......@@ -264,7 +265,7 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
val bundle = Bundle()
bundle.putString(VipActivity.VEDIO_ID, mVedioBean!!.vedioId.toString())
bundle.putString(VipActivity.THIRD_ID, mVedioBean!!.thirdId)
readyGo(VipActivity::class.java, bundle)
readyGo(MainActivity::class.java, bundle)
}
else -> {}
}
......
......@@ -56,6 +56,7 @@
android:orientation="vertical">
<LinearLayout
android:visibility="gone"
android:id="@+id/ll_my_vip"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -173,6 +174,7 @@
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingStart="20dp"
android:visibility="gone"
android:paddingEnd="15dp">
<TextView
......@@ -236,6 +238,7 @@
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingStart="20dp"
android:visibility="gone"
android:paddingEnd="15dp">
<TextView
......
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