user8542613
user8542613

Reputation: 755

Not show symbol "₺" on Android 4.4. (KitKat)

 <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

Upvotes: 0

Views: 209

Answers (2)

Aykut Karaca
Aykut Karaca

Reputation: 350

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

Upvotes: 0

Andrew
Andrew

Reputation: 1413

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);

Upvotes: 1

Related Questions