2
我有一個微調視圖。我將它的適配器設置爲擴展基本適配器的customAdapter。 但是,適配器的get view方法沒有被調用。 `baseAdapter的getView方法沒有被調用
public class CustomSpinnerAdapter extends BaseAdapter {
private Context mContext;
private LayoutInflater mInflater;
private TextView mLine1, mLine2;
private String mEmptyString = "--";
public CustomSpinnerAdapter(Context context) {
super();
mContext = context;
mInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
// TODO Auto-generated constructor stub
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
// TODO Auto-generated method stub
return view;
}}
然後我通過setAdapter()設置適配器。
告訴我們你是怎麼設置你的適配器 – 2013-02-13 10:35:17