Commit a12406bf authored by mengcuiguang's avatar mengcuiguang

Merge branch 'dev_ad' of http://39.97.65.143:81/android/android_goodmoney into dev_ad

parents 8fb1512f 386e0d29
...@@ -74,6 +74,9 @@ class DrawNativeVideoActivity : BaseActivity(), ...@@ -74,6 +74,9 @@ class DrawNativeVideoActivity : BaseActivity(),
const val WEB_VIDEO_URL = "https://vring.kuyin123.com/friend/94aa83142f7f5c98?videoId=" const val WEB_VIDEO_URL = "https://vring.kuyin123.com/friend/94aa83142f7f5c98?videoId="
} }
// Video 视频播放生命周期控制
private var isVideoPlayPause = false
// 列表页面播放page // 列表页面播放page
private var mCurrentPage = 0 private var mCurrentPage = 0
...@@ -118,6 +121,7 @@ class DrawNativeVideoActivity : BaseActivity(), ...@@ -118,6 +121,7 @@ class DrawNativeVideoActivity : BaseActivity(),
mLayoutManager = ViewPagerLayoutManager(this, OrientationHelper.VERTICAL) mLayoutManager = ViewPagerLayoutManager(this, OrientationHelper.VERTICAL)
mDrawVideoAdapter = DrawVideoAdapter(this, drawDatas) mDrawVideoAdapter = DrawVideoAdapter(this, drawDatas)
recy_draw_native.setItemViewCacheSize(1)
recy_draw_native.layoutManager = mLayoutManager recy_draw_native.layoutManager = mLayoutManager
recy_draw_native.adapter = mDrawVideoAdapter recy_draw_native.adapter = mDrawVideoAdapter
...@@ -306,8 +310,6 @@ class DrawNativeVideoActivity : BaseActivity(), ...@@ -306,8 +310,6 @@ class DrawNativeVideoActivity : BaseActivity(),
videoAdingManager.setVideoAdingListener(null) videoAdingManager.setVideoAdingListener(null)
videoAdingManager.onDestory() videoAdingManager.onDestory()
releaseVideo(mCurrentPlayIndex)
super.onDestroy() super.onDestroy()
if (downloadId != -1) { if (downloadId != -1) {
...@@ -483,4 +485,15 @@ class DrawNativeVideoActivity : BaseActivity(), ...@@ -483,4 +485,15 @@ class DrawNativeVideoActivity : BaseActivity(),
} }
} }
} }
override fun onPause() {
super.onPause()
// 释放当前页Video
releaseVideo(0)
}
override fun onResume() {
super.onResume()
playVideo(0)
}
} }
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