0
 <TextView
 android:id="@+id/salesEarnedValueTextView"
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 android:gravity="center"
 android:text="Test symbol ₺"
 android:textColor="#2c3939"
 android:textSize="23sp"
 android:textStyle="bold"
 app:layout_constraintBottom_toTopOf="@+id/earnedDividerView"
 app:layout_constraintEnd_toEndOf="parent"
 app:layout_constraintStart_toStartOf="parent"
 app:layout_constraintTop_toTopOf="parent" />

As result on Android 5+ text success show "Test symbol ₺". OK.

But on Android 4.4. show only "Test symbol " . Not show symbol

Chithra B
  • 586
  • 2
  • 9
user8542613
  • 745
  • 2
  • 14
  • 25

2 Answers2

1

By default Android uses Roboto typeface and different Android versions may use different typeface versions with different symbols set. So to support some specific symbols (like '₺' or '₽') at all devices you have to include latest Roboto font and use it like this

TextView txt = (TextView) findViewById(R.id.custom_font);
Typeface font = Typeface.createFromAsset(getAssets(), "Roboto-Medium.ttf");
txt.setTypeface(font);
Andrew
  • 1,383
  • 7
  • 21
  • You may download latest roboto here https://github.com/google/roboto/releases And check supported symbols here http://bluejamesbond.github.io/CharacterMap/ – Andrew Jan 29 '18 at 16:42
0

Yes better to find a font that supports that symbol and set the text to that custom typeface. Maybe this can help: How to use custom font in Android Studio

Aykut Karaca
  • 350
  • 3
  • 15
  • No you are wrong. Look at the code in the best answer. – Aykut Karaca Jan 29 '18 at 16:55
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – Vidhi Dave Feb 03 '18 at 04:09