RT 我现在知道把按钮监听写在适配器里 但具体要怎么写
public class MyViewPagerAdapter extends BasePagerAdapter{
public MyViewPagerAdapter(Context context, List views) {
super(context);
// TODO Auto-generated constructor stub
this.mDatas = views;
}
@Override
public Object instantiateItem(ViewGroup container, int position) {
// TODO Auto-generated method stub
View view = mDatas.get(position);
if(view != null){
container.addView(view);
}
return view;
}
这是我适配器的代码 要加什么才能实现?