80,351
社区成员
发帖
与我相关
我的任务
分享
private class MyArrayAdapter<String> extends ArrayAdapter<String> {
public MyArrayAdapter(Context context, String[] resourceId,
int textViewResourceId) {
super(context, textViewResourceId, resourceId);
}
public TextView getView(int position, View convertView, ViewGroup parent) {
TextView v = (TextView) super
.getView(position, convertView, parent);
Typeface tf =Typeface.createFromAsset(getAssets(), "fonts/samplefont.ttf");
v.setTypeface(tf);
v.setTextSize(30);
return v;
}
public TextView getDropDownView(int position, View convertView,
ViewGroup parent) {
TextView v = (TextView) super
.getView(position, convertView, parent);
Typeface tf =Typeface.createFromAsset(getAssets(), "fonts/samplefont.ttf");
v.setTypeface(tf);
v.setTextSize(30);
return v;
}
}