Reputation: 428
How do I have special characters such as greek/latin letters, longer dashes etc in my button text name? In the sample below, I want to replace 1234 in android:text="1234" with special characters.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="1234" />
</LinearLayout>
Upvotes: 0
Views: 63
Reputation: 602
You can use Unicode character hexa position just prefix it with \u
inside String
"Ά"
= (char)0x0386
= "\u0386"
Upvotes: 1