# Utility

open class Utility

## Constructors

Utility
Link copied to clipboard
constructor()

## Properties

INVALID_COLOR
Link copied to clipboard
val INVALID_COLOR: Int = -2147483648
INVALID_RESOURCE_ID
Link copied to clipboard
val INVALID_RESOURCE_ID: Int = 0

## Functions

containsStringInClass
Link copied to clipboard
open fun containsStringInClass(@NonNull className: String, @NonNull userType: String): Boolean
open fun containsStringInClass(@NonNull className: String, @NonNull userType: String, isStatic: Boolean): Boolean
Check if input string(userType) is defined in this class.
generateUUID
Link copied to clipboard
@NonNull
open fun generateUUID(): String
getKeyHash
Link copied to clipboard
open fun getKeyHash(applicationContext: Context): String
getResourceId
Link copied to clipboard
open fun getResourceId(@NonNull context: Context, @NonNull name: String, @NonNull type: String): Int
getResourceName
Link copied to clipboard
@Nullable
open fun getResourceName(@NonNull context: Context, resourceId: Int): String
getStringFromVariable
Link copied to clipboard
@Nullable
open fun getStringFromVariable(@NonNull className: String, @NonNull fieldName: String): String
@Nullable
open fun getStringFromVariable(@NonNull className: String, @NonNull fieldName: String, isStatic: Boolean): String
Get specific string field in this class.
getStringsInClass
Link copied to clipboard
@NotNull
open fun getStringsInClass(@NonNull className: String, isStatic: Boolean): @NotNull List<String>
Get all string variables in this class.
isValidResourceId
Link copied to clipboard
open fun isValidResourceId(id: Int): Boolean
openUrl
Link copied to clipboard
open fun openUrl(@NonNull context: Context, @NonNull uriString: String)