Commit 0a22420e authored by liuyang's avatar liuyang

增加程序前台判断逻辑,修复启动问题

parent 0dbc9c45
......@@ -71,6 +71,7 @@ class MainActivity : AppCompatActivity(), IAppBaseCallback {
requestAppList()
refreshBtn.isEnabled = true
refreshBtn.setOnClickListener{
this.appInfoAdapter.clear()
requestAppList()
......@@ -86,6 +87,7 @@ class MainActivity : AppCompatActivity(), IAppBaseCallback {
startBtn.postDelayed({
startBtn.isEnabled = true
startBtn.text = "启动"
refreshBtn.isEnabled = true
}, 3000)
}
else {
......@@ -94,7 +96,8 @@ class MainActivity : AppCompatActivity(), IAppBaseCallback {
startBtn.postDelayed({
startBtn.isEnabled = true
startBtn.text = "停止"
}, 3000)
refreshBtn.isEnabled = false
}, 2000)
}
}
......
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