If I get a row from Database with Room and LiveData, how can I “synchronize” it with a variable in the UI thread?

前端 未结 0 1967
轮回少年
轮回少年 2021-01-06 01:32

The example: selectedCode.something() gives error, because selectedCode is null, it has not initialized in the other thread, but I don\'t want the whole section to write in

相关标签:
回答
  • 消灭零回复
提交回复
热议问题