將跳轉加上coroutine
This commit is contained in:
+4
-2
@@ -141,6 +141,7 @@ class SplitViewFragment : Fragment() {
|
|||||||
return@setOnClickListener
|
return@setOnClickListener
|
||||||
}
|
}
|
||||||
stopAll()
|
stopAll()
|
||||||
|
MainScope().launch {
|
||||||
val item = data[position]
|
val item = data[position]
|
||||||
val bundle = Bundle().apply {
|
val bundle = Bundle().apply {
|
||||||
//putInt(MonitoringActivity.BUNDLE_DEVICE_ID, item.id)
|
//putInt(MonitoringActivity.BUNDLE_DEVICE_ID, item.id)
|
||||||
@@ -158,6 +159,7 @@ class SplitViewFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun setAllUrl() {
|
private fun setAllUrl() {
|
||||||
for (index in data.indices) {
|
for (index in data.indices) {
|
||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user