vault backup: 2024-05-21 09:44:49

This commit is contained in:
2024-05-21 09:44:49 +08:00
parent 2be9e4110d
commit 9b2d33b9d4
507 changed files with 4 additions and 3 deletions

8
20. 專注/Android/UI.md Normal file
View File

@@ -0,0 +1,8 @@
## 在thread更新UI
Android framework只能在main thread裡更新UI若需要在其他的thread更新UI的話需要呼叫activity的`runOnUiThread()`
例:
```kotlin
activity?.runOnUiThread {
activity?.findViewById<TextView>(R.id.textView)?.text = "You say: " + call.parameters["something"]
}
```