I'm using an array like below and I'm using "category" variable after that without problem.
var category = resources.getStringArray(R.array.**main_menu**)
My question is, how can I make a variable "main_menu"? There are other arrays also exist and I want to send their names as a varible in this line?
I tried the code below, but surely it's not working, because it's text and "getStringArray" expecting Int.
var **text** = R.array.main_menu
var mainCategory = resources.getStringArray(**text**)
context.getPackageName(). You can use same context which you use to getresources.