Commit 7b24a2d9 authored by mengcuiguang's avatar mengcuiguang

优化好兔视频

parent 3a2aafc5
......@@ -21,13 +21,6 @@ class DhGameFragment : LazyLoadBaseFragment() {
}
override fun onFragmentFirstVisible() {
LogUtil.e("DhGameFragment","onFragmentFirstVisible")
}
override fun onFragmentResume() {
super.onFragmentResume()
if (AppConfig.fragmentClickFlag === Constant.FRAGMENT_CLICK_MAIN) {
}
}
override fun onDestroy() {
......
......@@ -237,9 +237,12 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
if (isFirstLoadVedio) {
isFirstLoadVedio = false
initTimeview()
}else{
resumeDownloadTime(videoid)
}
vedioId = videoid
LogUtil.d(TAG,"onStart videoid:${videoid}")
}
override fun onPause(p0: String?, p1: String?, p2: String?) {
......@@ -251,11 +254,13 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
}
override fun onComplete(p0: String?, videoid: String, p2: String?) {
addVedioIdList(videoid)
pauseDownloadTime()
}
override fun onLoopComplete(p0: String?, p1: String, p2: String?, p3: Int) {
override fun onLoopComplete(pager: String?, videoID: String, taskID: String?, num: Int) {
addVedioIdList(videoID)
pauseDownloadTime()
LogUtil.d(TAG,"onLoopComplete pager:${pager} videoID:${videoID} taskID:${taskID} num:${num}")
}
override fun onStuckStart(p0: String?, p1: String?, p2: String?) {
......
......@@ -49,13 +49,13 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
private fun initView() {
val tabs: MutableList<String> = ArrayList()
tabs.add("视频")
// tabs.add("游戏")
tabs.add("游戏")
tabs.add("书城")
val fragments: MutableList<Fragment> = ArrayList()
mainFragment = MainFragment()
fragments.add(mainFragment!!)
// fragments.add(DhGameFragment())
fragments.add(DhGameFragment())
fragments.add(ZhangyueFragment())
//去除两侧应阴影
......@@ -81,11 +81,11 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
}
override fun onTabSelected(tab: XTabLayout.Tab) {
// if (tab.position == 1 && !UserManager.getInstance().userIsLogin()) {
// readyGo(LoginActivity::class.java)
// vpFragmentMoney.currentItem = if (curPosition == 1) 0 else curPosition
// return
// }
if (tab.position == 1 && !UserManager.getInstance().userIsLogin()) {
readyGo(LoginActivity::class.java)
vpFragmentMoney.currentItem = if (curPosition == 1) 0 else curPosition
return
}
curPosition = tab.position
}
}
\ No newline at end of file
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