use custome textview as below and set the font there
public class MyTextView extends TextView{ public MyTextView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); init(); rotate(); } public MyTextView(Context context, AttributeSet attrs) { super(context, attrs); init(); rotate(); } public MyTextView(Context context) { super(context); init(); rotate(); } private void rotate() {
and in the xml list line in list_row layout add textview as
<YourpackageName.MyTextView android:layout_marginTop="10dip" android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" android:textSize="22px" android:textColor="#34A4c5" android:ellipsize="marquee" android:maxWidth="220dp" android:fadingEdge="horizontal" android:marqueeRepeatLimit="marquee_forever" android:scrollHorizontally="true" android:singleLine="true" android:layout_marginLeft="10dp" android:textAppearance="?android:attr/textAppearanceLarge" android:layout_marginRight="10dp"></YourpackageName.MyTextView>
here the u property is used more, which can be removed, which is not required, and in your getview method define it as
MyTextView title = (MyTextView)vi.findViewById(R.id.title);
source share