Take the 2-minute tour ×

I have several ListActivities, in which I need to set up, for each row, cusom typeface I am loading from assets. In TextView this is not a problem, but I am facing problem of accessing my list items. ListActivity seems to not have method *.setTypeface(), so I have come to the dead end. Anyone had faced same problem before?

share|improve this question
add comment

2 Answers

How are you populating your ListView? Most likely you are using one of the generic ListAdapter implementations which seem to only provide bare-bones functionality and not much else.

My suggestion would be to design your own View to use in your ListView along with your own ArrayAdapter implementation that configures type face etc. from within it's getView(...) method. You'll find quite a few tutorials on the subject if you google "custom android ArrayAdapter".

share|improve this answer
add comment

You do not set the type face on the listview. You need to set the typeface on a textview. So use a custom array adapter for your listview, inflate your own custom view which would contain a textview, and then set the typeface on that text view.

To go along with what Nick said, google "custom android arrayadapter"

share|improve this answer
add comment

Your Answer


