將跳轉加上coroutine
This commit is contained in:
parent
9fc8673715
commit
b4346f142b
@ -141,17 +141,19 @@ class SplitViewFragment : Fragment() {
|
||||
return@setOnClickListener
|
||||
}
|
||||
stopAll()
|
||||
val item = data[position]
|
||||
val bundle = Bundle().apply {
|
||||
//putInt(MonitoringActivity.BUNDLE_DEVICE_ID, item.id)
|
||||
//putInt(MonitoringActivity.BUNDLE_CHANNEL_ID, item.channelId)
|
||||
putParcelable(MonitoringActivity.BUNDLE_DEVICE, item)
|
||||
MainScope().launch {
|
||||
val item = data[position]
|
||||
val bundle = Bundle().apply {
|
||||
//putInt(MonitoringActivity.BUNDLE_DEVICE_ID, item.id)
|
||||
//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) {
|
||||
videoViews[index].stopRetryCount()
|
||||
videoViews[index].stop()
|
||||
delay(500)
|
||||
delay(300)
|
||||
}
|
||||
}
|
||||
}.start()
|
||||
|
||||
companion object {
|
||||
private val TAG = SplitViewFragment::class.java.simpleName
|
||||
|
||||
Loading…
Reference in New Issue
Block a user