我正在尝试在spinner上设置字体,如下所示:
final Typeface font = Typeface.createFromAsset(context.getAssets(),"fonts/futura-medium.ttf");
ArrayAdapter<String> hoursAdapter = new ArrayAdapter<String>(context, R.layout.spinner_item){
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View view = super.getView(position, convertView, parent);
((TextView)view.findViewById(R.id.spinnertext)).setTypeface(font);
return view;
}
@Override
public View getDropDownView(int position, View convertView, ViewGroup parent) {
View view = super.getDropDownView(position, convertView, parent);
((TextView)view.findViewById(R.id.spinnertext)).setTypeface(font);
return view;
}
};
该场景就像应用程序语言是GE_SS_Unique_Light一个阿拉伯字体并且只更改微调字体,但它工作正常。当我尝试使用其他字体时。 有什么建议吗?