[kotlin]Must be called from main thread of fragment host해결방법
onbackpressed 할려고 했더니.. 크래쉬가 난다..
val timer = Timer()
timer.schedule(object : TimerTask()
{
override fun run() {
onBackPressed()
}
} , 2000)
runOnUiThread {
onBackPressed()
}
바꿔주면 메인 쓰레드에서 동작
'android,kotlin' 카테고리의 다른 글
[kotlin]fragment context error해결방법 (0) | 2021.11.02 |
---|---|
[kotlin] not build viewbinding 해결방법 (0) | 2021.10.26 |
[kotlin] date custome formmater 방법 (0) | 2021.09.28 |
[kotlin]Missing contentDescription attribute on image 해결 방법 (0) | 2021.09.23 |
[kotlin]webview errr_access_Denied 해결방법 (0) | 2021.03.15 |