As per Java docs
The Identifier in a EnumConstant may be used in a name to refer to the enum constant.
so we need to use the name only in case of an enum.
Change to this
switch (Prefs.getCardStyle()) {
case COMPACT: rCompact.setChecked(true); break;
case FLAT: rFlat.setChecked(true); break;
case MATERIAL: default: rMaterial.setChecked(true); break;
}