Here is the java Version
private Boolean isDarkTheme(Activity activity) {
    return (activity.getResources().getConfiguration().uiMode &
            Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES;
}
Java getResources() ->Kotlin resources
Java getConfiguration() ->Kotlin configuration
Java & ->Kotlin and
as you see it’s simple Setters and Getters in koltin are accessed by property name
solved Is anyone still using Java? Can I have this translated please? [closed]