I am trying to display a text that i set in TextView
. I have already assigned a string in strings.xml
with the name operator_mixed
Strings.xml
<string name="operator_mixed">%d %s %d %s %d</string>
And in my initialize.java file i tried to refer to this string, but it doesn't display anything.However when i try to display text without any formatting it kinda works ,but i know concatenating strings in textview is not preferable.
Initialize.java
textview.setText(getString(R.string.operator_mixed, a1, operator1, a2, operator2, a3));
Where a1, a2, a3 are integers and operator1, operator2 are strings.
Is there any problem with my code?