I got this variable
val questionType = R.string.add
Here is from the string resource
<string name="add">%d + %d?</string>
I want to pass value to %d by using questionType
in a ViewModel, is it possible to do so?
I got this variable
val questionType = R.string.add
Here is from the string resource
<string name="add">%d + %d?</string>
I want to pass value to %d by using questionType
in a ViewModel, is it possible to do so?
Yes it is possible.
<string name="welcome_messages">Hello, You haven't been around %1$s hours.</string>
val text = res.getString(R.string.welcome_messages, hourCount);
someTextview.text = text