vault backup: 2025-03-04 11:17:00

This commit is contained in:
2025-03-04 11:17:00 +08:00
parent d1e51bfd2f
commit ff12c4f4ca
161 changed files with 1 additions and 2 deletions

8
21.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"]
}
```