-
Notifications
You must be signed in to change notification settings - Fork 24
Using @StringDef in kotlin
Devrath edited this page Oct 24, 2024
·
5 revisions
-
@StringDefis anannotationin Android that is part of the Androidannotation processingframework. - It is used to enforce type safety when dealing with string constants.
- Instead of using
enumwhich is costly in terms of memory and performance, especially in Android@StringDefensures only specific strings could be passed as values or used as parameters.
