Issue
In strings.xml
file I have the following entry -
<string name="Rs">\u20B9</string>
Now in my activity_main.xml
file when I have the entry -
android:text="@string/Rs"
the output on device is correctly shown as "₹"
But when I have the entry -
android:text="Pizza @string/Rs 350"
the output on my device is incorrectly shown as "Pizza @string/Rs 350"
How to correct this?
Solution
You have put the following code in your strings.xml file -
<string name="pizza_price">Pizza \u20B9350</string>
and you have to put the following code in your activity_main.xml file -
android:text="@string/pizza_price"
Source - Concatenate multiple strings in Android Studio xml
Answered By - Payel Senapati
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.