我已经找到了许多不同的方法来完成这个,但我不确定什么是最适合我的方案.
这是我的listview的Java代码:
ListView lv;
lv = (ListView) findViewById(R.id.favList);
这是列表的xml代码:
android:id="@+id/favList"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="40dp"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:layout_marginTop="20dp"
android:background="@android:color/transparent"
android:cacheColorHint="@android:color/transparent"
android:listSelector="@android:color/transparent" >
对于文本视图,我会添加:
final Typeface fontList = Typeface.createFromAsset(assets, "optima-extra-black.ttf");
lv.setTypefa