Enol Simón
05/27/2024, 8:46 AMResources
by key?
Edit:
For example: I know the name of the key that I need and I need the string associated, something like: getString("my_string")
instead getString(<http://Res.string.my|Res.string.my>_string)
Raphael TEYSSANDIER
05/27/2024, 8:51 AMEnol Simón
05/27/2024, 8:55 AMgetString("my_string")
instead getString(<http://Res.string.my|Res.string.my>_string)
Raphael TEYSSANDIER
05/27/2024, 8:56 AMDuane Malcolm
06/17/2024, 7:55 PMEnol Simón
06/17/2024, 7:59 PMval stringsMap =
mapOf(
"app_name" to Res.string.app_name,
)
Enol Simón
06/17/2024, 8:00 PMfun getStringByKey(name: String): String? =
val res = MapResources.stringsMap[name]
.......
Enol Simón
06/17/2024, 8:00 PMEnol Simón
06/17/2024, 8:01 PMEnol Simón
06/17/2024, 8:01 PMDuane Malcolm
06/17/2024, 8:35 PMIconic
object to get drawables using a key.Duane Malcolm
06/17/2024, 8:36 PM