https://kotlinlang.org logo
#android
Title
# android
z

zt

03/23/2023, 10:27 PM
Copy code
@Parcelize
enum class SettingsSection(
    val icon: ImageVector,
    @StringRes override val label: Int,
) : SettingsDestination {
    GENERAL(Icons.Default.Settings, R.string.general),
    APPEARANCE(Icons.Default.Palette, R.string.appearance),
    ACCOUNTS(Icons.Default.ManageAccounts, R.string.accounts),
    SPONSOR_BLOCK(Icons.Default.MoneyOff, R.string.sponsor_block),
    BACKUP_RESTORE(Icons.Default.SettingsBackupRestore, R.string.backup_restore),
    ABOUT(<http://Icons.Default.Info|Icons.Default.Info>, R.string.about);

    @Parcelize
    companion object : SettingsDestination {
        @IgnoredOnParcel
        override val label = R.string.settings
    }
}
How do I make it not include the two fields in the parcel?
14 Views