Last active
October 27, 2015 14:27
-
-
Save ar-android/392d9ba927e7bcd82b2d to your computer and use it in GitHub Desktop.
simple set font arabic on text view
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package id.pondokprogrammer.asmaulhusna; | |
| import android.app.Activity; | |
| import android.graphics.Typeface; | |
| import android.os.Bundle; | |
| import android.widget.TextView; | |
| public class DetailAsmaulHusna extends Activity { | |
| private TextView judul; | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| setContentView(R.layout.activity_detail_asmaul_husna); | |
| judul = (TextView)findViewById(R.id.txtDetailTitleArabic); | |
| Typeface tf = Farsi.GetFarsiFont(this); | |
| judul.setTypeface(tf); | |
| judul.setText(Farsi.Convert("الرحمن")); | |
| } | |
| } | |
| <TextView | |
| android:id="@+id/txtDetailTitleArabic" | |
| android:layout_width="fill_parent" | |
| android:layout_height="wrap_content" | |
| android:layout_marginTop="10dp" | |
| android:gravity="center_horizontal" | |
| android:text="الرحمن" | |
| android:textColor="#616161" | |
| android:textSize="70dp" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment