將跳轉加上coroutine
This commit is contained in:
parent
9fc8673715
commit
b4346f142b
@ -141,17 +141,19 @@ class SplitViewFragment : Fragment() {
|
|||||||
return@setOnClickListener
|
return@setOnClickListener
|
||||||
}
|
}
|
||||||
stopAll()
|
stopAll()
|
||||||
val item = data[position]
|
MainScope().launch {
|
||||||
val bundle = Bundle().apply {
|
val item = data[position]
|
||||||
//putInt(MonitoringActivity.BUNDLE_DEVICE_ID, item.id)
|
val bundle = Bundle().apply {
|
||||||
//putInt(MonitoringActivity.BUNDLE_CHANNEL_ID, item.channelId)
|
//putInt(MonitoringActivity.BUNDLE_DEVICE_ID, item.id)
|
||||||
putParcelable(MonitoringActivity.BUNDLE_DEVICE, item)
|
//putInt(MonitoringActivity.BUNDLE_CHANNEL_ID, item.channelId)
|
||||||
|
putParcelable(MonitoringActivity.BUNDLE_DEVICE, item)
|
||||||
|
}
|
||||||
|
val intent = Intent(requireContext(), MonitoringActivity::class.java)
|
||||||
|
intent.putExtras(bundle)
|
||||||
|
startActivity(intent)
|
||||||
|
//gotoActivity(MonitoringActivity::class.java, bundle)*/
|
||||||
|
//Log.d("${TAG}_$mPageNum", "check: $item")
|
||||||
}
|
}
|
||||||
val intent = Intent(requireContext(), MonitoringActivity::class.java)
|
|
||||||
intent.putExtras(bundle)
|
|
||||||
startActivity(intent)
|
|
||||||
//gotoActivity(MonitoringActivity::class.java, bundle)*/
|
|
||||||
//Log.d("${TAG}_$mPageNum", "check: $item")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -179,9 +181,9 @@ class SplitViewFragment : Fragment() {
|
|||||||
for (index in data.indices) {
|
for (index in data.indices) {
|
||||||
videoViews[index].stopRetryCount()
|
videoViews[index].stopRetryCount()
|
||||||
videoViews[index].stop()
|
videoViews[index].stop()
|
||||||
delay(500)
|
delay(300)
|
||||||
}
|
}
|
||||||
}
|
}.start()
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private val TAG = SplitViewFragment::class.java.simpleName
|
private val TAG = SplitViewFragment::class.java.simpleName
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user