Good link:::
http://amitandroid.blogspot.in/2013/01/how-to-use-external-fonts-therough.html
1) add font file in assets folder
2) create class TextNormal.java in package com.app.utility.
package com.app.utility;
import android.content.Context;
import android.graphics.Typeface;
import android.util.AttributeSet;
import android.widget.TextView;
public class TextNormal extends TextView {
public TextNormal(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
init();
}
public TextNormal(Context context, AttributeSet attrs) {
super(context, attrs);
init();
}
public TextNormal(Context context) {
super(context);
init();
}
public void init() {
if (!isInEditMode()) {
Typeface tf = Typeface.createFromAsset(getContext().getAssets(),
"segoeui_0.ttf");
setTypeface(tf);
}
}
}
http://amitandroid.blogspot.in/2013/01/how-to-use-external-fonts-therough.html
1) add font file in assets folder
2) create class TextNormal.java in package com.app.utility.
package com.app.utility;
import android.content.Context;
import android.graphics.Typeface;
import android.util.AttributeSet;
import android.widget.TextView;
public class TextNormal extends TextView {
public TextNormal(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
init();
}
public TextNormal(Context context, AttributeSet attrs) {
super(context, attrs);
init();
}
public TextNormal(Context context) {
super(context);
init();
}
public void init() {
if (!isInEditMode()) {
Typeface tf = Typeface.createFromAsset(getContext().getAssets(),
"segoeui_0.ttf");
setTypeface(tf);
}
}
}
3) in xml add your textview like
<com.app.utility.TextNormal
android:id="@+id/txtRemeberMe"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginLeft="@dimen/val_5"
android:gravity="left"
android:padding="@dimen/txt_padding_left"
android:text="@string/remember_me"
android:textSize="@dimen/txt_small_size" />