ListActivity list = new ListActivity();
MyAdapter adapter = new MyAdapter(this);
list.setListAdapter(adapter);
public class MyAdapter extends BaseAdapter{
//这部分有错误要怎么改啊?
private LayoutInflater mInflater;
public MyAdapter (Context context){
this.mInflater = LayoutInflater.from(context);
}
}
fragment中 如果要用context 就必须是getActivity()
是什么错误?
The constructor ViewPageFragment.MyAdapter(ViewPageFragment) is undefined
知道是构造行数的错误,就是不知道怎么改,以前在Activity里写过自定义函数,就是没在Fragment这里写过