이것은 Eclipse에서 오류가 발생하는 어댑터 파일입니다. 얘들 아 좀 도와주세요 :) 당신이 그것을 확인할 수있는 코드는 다음과 같습니다. 얘들 아. 이것은 일식에 오류가 발생하는 어댑터 파일입니다. 얘들 아, 제발 도와주세요 :) 당신이 그것을 확인할 수있는 코드는 여러분에게 감사합니다.내 자산 폴더에서 내 글꼴을 변경하려고했지만 "setTypeface (서체) 형식이 객체 유형에 대해 정의되지 않았습니다."라는 오류가 발생합니다.
private Activity activity;
private List<Pojo> itemsfavorite;
private Pojo objFavoriteBean;
private int row;
public Favorite_Activity_Adapter(Activity act, int resource, List<Pojo> arrayList) {
super(act, resource, arrayList);
this.activity = act;
this.row = resource;
this.itemsfavorite = arrayList;
}
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
View view = convertView;
ViewHolder holder;
if (view == null) {
LayoutInflater inflater = (LayoutInflater) activity
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = inflater.inflate(row, null);
holder = new ViewHolder();
view.setTag(holder);
} else {
holder = (ViewHolder) view.getTag();
}
if ((itemsfavorite == null) || ((position + 1) > itemsfavorite.size()))
return view;
objFavoriteBean = itemsfavorite.get(position);
holder.txt_favoquote=(TextView)view.findViewById(R.id.text_dis);
holder.txt_favotitle=(TextView)view.findViewById(R.id.text_title);
//you can make any language quotes app just put ttf file in asset->font and below set ttf file
String fontPathtitle = "font/Kremlin.ttf";
Typeface tftitle = Typeface.createFromAsset(activity.getAssets(), fontPathtitle);
holder.txt_categorylistquote).setTypeface(tftitle);
holder.txt_title).setTypeface(tftitle);
String formattedString=android.text.Html.fromHtml(objFavoriteBean.getPQuote().toString()).toString();
holder.txt_favoquote.setText(formattedString);
return view;
}
public class ViewHolder {
public Object txt_title;
public Object txt_categorylistquote;
public TextView txt_favoquote,txt_favotitle;
}
은}
어떤 오류가 발생하고 있습니까? – Daniel
"setTypeface (Typeface) 메서드는 Object 유형에 대해 정의되지 않았습니다." –