vault backup: 2024-01-01 17:19:42

This commit is contained in:
2024-01-01 17:19:42 +08:00
parent 0b2e0f0df9
commit 8aedf525b5
439 changed files with 39 additions and 39 deletions

8
04. 專注/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"]
}
```