I am using simple ListAdapter. I want to use custom font in it. I was suggested to use getView() but as a beginner i am unaware of using custom adapter. Can someone help it.
Asked
Active
Viewed 31 times
-1
-
how much i know you want to use the ttf file for the custom font then set it on your textview or any where else you desire – Hasnain Aug 23 '14 at 13:37
-
I know that...I m looking for implementation solution – user45678 Aug 23 '14 at 13:49
-
ok wait i am sending you an example of that – Hasnain Aug 23 '14 at 13:52
-
May be my answer help you – Hasnain Aug 23 '14 at 13:56
1 Answers
-1
first of all put any ttf file in your asset folder then put on your textview like this
Typeface face = Typeface.createFromAsset(getAssets(), precious.ttf);//or any other ttf you want
String edittextString = title.getText().toString();
title.setText("");
title.setTypeface(face);
title.setTextColor(Color.parseColor(hexColor));
if (edittextString != null) {
title.setText(edittextString);
}

Hasnain
- 274
- 2
- 14
-
Hasnain - Thanks but i know it. I am looking it to implement custom adapter. Please answer relevantly. Thanks once again – user45678 Aug 23 '14 at 14:08
-
-