Code Cleanup
This commit is contained in:
parent
4b4232ce6b
commit
b143419520
4 changed files with 4 additions and 16 deletions
|
@ -2,6 +2,7 @@ package code.name.monkey.appthemehelper
|
|||
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
|
||||
/**
|
||||
|
@ -30,6 +31,6 @@ open class ATHActivity : AppCompatActivity() {
|
|||
fun postRecreate() {
|
||||
// hack to prevent java.lang.RuntimeException: Performing pause of activity that is not resumed
|
||||
// makes sure recreate() is called right after and not in onResume()
|
||||
Handler().post { recreate() }
|
||||
Handler(Looper.getMainLooper()).post { recreate() }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue