Android 如何将Telugu字体应用于微调器?

Android 如何将Telugu字体应用于微调器?,android,web-services,android-fonts,Android,Web Services,Android Fonts,在我的应用程序中,我使用了JSON web服务。通过web服务,我得到了Telugu字体。如何将此Telugu字体添加到我的微调器 LayoutInflater lv = getLayoutInfalter(); View v = lv.inflate(R.layout.spineerfont,false); TextView tv = (TextView)v.findViewById(R.id.sp); Typeface faceGautami = Typeface.createFromAss

在我的应用程序中,我使用了JSON web服务。通过web服务,我得到了Telugu字体。如何将此Telugu字体添加到我的微调器

LayoutInflater lv = getLayoutInfalter();
View v = lv.inflate(R.layout.spineerfont,false);
TextView tv = (TextView)v.findViewById(R.id.sp);
Typeface faceGautami = Typeface.createFromAsset(getAssets(), "gautami.ttf");
tv.setTypeface(faceGautami);

您可以在
getView()
getDropDownView()
中通过自己的自定义
SpinnerAdapter
应用字体


我已经使用了ArrayAdapter。在ArrayAdapter中,我已经通过了this layout R.loayout.spineerfont编辑我的答案。检查
public View getView(int position, View convertView, ViewGroup parent) {

LayoutInflater inflater = getLayoutInflater();
View row = inflater.inflate(yourRowlayout, parent,false);
TextView make = (TextView) row.findViewById(R.id.sp);
Typeface myTypeFace = Typeface.createFromAsset(context.getAssets(),
            "fonts/gautami.ttf");
v.setTypeface(myTypeFace);
v.setText(itemList.get(position));
return row;
}


public View getDropDownView(int position, View convertView, ViewGroup parent) {

LayoutInflater inflater = getLayoutInflater();
View row = inflater.inflate(yourRowlayout, parent,false);
TextView make = (TextView) row.findViewById(R.id.sp);
Typeface myTypeFace = Typeface.createFromAsset(context.getAssets(),
            "fonts/gautami.ttf");
v.setTypeface(myTypeFace);
v.setText(itemList.get(position));
return row;
}