How to write this with Kotlin? ```static { App...
# android
g
How to write this with Kotlin?
Copy code
static {
    AppCompatDelegate.setDefaultNightMode(
        AppCompatDelegate.MODE_NIGHT_NO);
}
public class MyApplication extends Application {
}
google 5
d
Copy code
class MyApplication : Application() {
    init { 
        AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO)
    }
}
❤️ 1
h
You can use convert tool was embedded in Android Studio to change from Java to Kotlin by yourself