getString

fun Resources.getString(name: String, packageName: String): String

A reflective way to get string from resources.

Return

The string if found, null otherwise.

Parameters

name

The name of the string.

packageName

The package where the resources are contained. This is usually in BuildConfig.LIBRARY_PACKAGE_NAME

Throws

If the resource is not found.