miha-x64
04/11/2017, 12:12 PMenum class DisplayedCardStyle(@StringRes val preferenceEntry: Int) {
Classic(R.string.abc_action_bar_home_description_format),
Simple(R.string.abc_action_bar_home_description);
companion object {
private val VALS = values()
fun fromPref(@StringRes preferenceEntry: Int)
= VALS.firstOrNull { it.preferenceEntry == preferenceEntry } ?: Classic
}
}
🙃