1

I want to add a String Rate ₹ as my Button text I tried using

<string name="Rs">\u20B9</string>

which is working fine. But I am confused about adding the text Rate .

       <Button
            android:id="@+id/btnRate"
            android:layout_width="wrap_content"
            android:layout_margin="5dp"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:text="@string/Rs"
            android:background="@android:color/transparent"/>

Any help will be greatly appreciated

2
  • are you change button text at runtime also...? Commented Mar 18, 2016 at 10:12
  • No. I'm not changing Commented Mar 18, 2016 at 10:28

2 Answers 2

2

<string name="Rs">Rate \u20B9</string> This should work.

Sign up to request clarification or add additional context in comments.

Comments

1

Please try

<string name="Rs">Rate \u20B9</string>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.