Commit 971b1fc0 by 严久程

声网 倒计时按钮逻辑

parent 2db1ac74
......@@ -627,19 +627,26 @@ class AudioHomeActivity :
sendDoctocrMsg = Gson().toJson(msgBean)
YDLRTMClient.instances.call(listenerUid!!, channelId, sendDoctocrMsg)
//开始60s等待倒计时
waitDisposable = Observable.interval(0, 100, TimeUnit.MILLISECONDS)
Observable.interval(0, 100, TimeUnit.MILLISECONDS)
.subscribeOn(Schedulers.computation())
.take(603)
.take(303)
.observeOn(AndroidSchedulers.mainThread())
.subscribe({
var result = it.toFloat() / 2.5f
.subscribe({ var result = it.toFloat() / 2.5f
progress_view.setProgress(result)
if (result >= 100f && !iv_hang_up.isEnabled) {
//挂断按钮可点击
iv_hang_up.isEnabled = true
iv_hang_up.setImageResource(R.drawable.audioim_img_hang_up)
}
}},{},{})
//开始60s等待倒计时
waitDisposable = Observable.interval(0, 100, TimeUnit.MILLISECONDS)
.subscribeOn(Schedulers.computation())
.take(603)
.observeOn(AndroidSchedulers.mainThread())
.subscribe({
}, {
LogUtil.d(it.message)
}, {
......
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