例如:
private Context context;
public OrderJinxAdapter(Context context, int textViewResourcedId, List object){
super();
resourceId = textViewResourcedId;
this.context=context;
data=object;
}
final Resources res = context.getResources();
final Drawable order_close=res.getDrawable(R.drawable.order_close);
order_close.setBounds(0, 0, 30, 30);
holder.shouqi.setCompoundDrawables(null, null, order_close, null);
Android:在Adapter中怎么调用getresources()
最新推荐文章于 2024-04-25 19:17:38 发布