Skip to content

Instantly share code, notes, and snippets.

@iamkingalvarado
Created April 14, 2023 21:05
Show Gist options
  • Save iamkingalvarado/12f08cb821d2b5fd0aef8610d836c72b to your computer and use it in GitHub Desktop.
Save iamkingalvarado/12f08cb821d2b5fd0aef8610d836c72b to your computer and use it in GitHub Desktop.
enum class ContributorType(val key: String, @StringRes val titleRes: Int) {
Founder("founder", 0),
Creator("creator", R.string.feat_profile_about_creator),
Designer("designer", R.string.feat_profile_about_designer),
Editor("editor", R.string.feat_profile_about_editor),
Reviewer("reviewer", R.string.feat_profile_about_reviewer),
AndroidDeveloper("android", R.string.feat_profile_about_android_developer),
BackendDeveloper("backend", R.string.feat_profile_about_backend_developer),
WebDeveloper("web", R.string.feat_profile_about_web_developer),
IosDeveloper("ios", R.string.feat_profile_about_ios_developer),
Testing("testing", R.string.feat_profile_about_ios_developer),
Unknown("", -1);
companion object {
fun from(key: String) = values().firstOrNull { it.key == key } ?: Unknown
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment