Commit 7823f573 authored by mengcuiguang's avatar mengcuiguang

代码优化

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