CustomCategory

data class CustomCategory

A data class to add custom categories, used in some apps. A string resource is used to translate the label of the category into the user’s device language.

Summary

Constructors
CustomCategory(label: Int)
CustomCategory(label: Int, value: String?)
Properties
Int label
A string resource to the label to show on the UI.
String? value
The category or search term used for the category. When null, the resolved string resource from the label field is used.

Constructors

CustomCategory

CustomCategory(label: Int)
Parameters
label: Int A string resource to the label to show on the UI.

CustomCategory

CustomCategory(label: Int, value: String?)
Parameters
label: Int A string resource to the label to show on the UI.
value: String? The category or search term used for the category. When null, the resolved string resource from the label field is used.

Properties

label

@StringRes val label: Int

A string resource to the label to show on the UI.

value

val value: String? = null

The category or search term used for the category. When null, the resolved string resource from the label field is used.


If something needs to be added or if you find an error in our documentation, please let us know either on our GitHub or Discord.

Last updated on September 21, 2023