Adapter中调用Activity中的方法

Activity:

public class TbgcActivity extends Activity implements OnClickListener {
	 public void diaoyong(){
	     new getMassThread().start();
	 }
}

Adapter:

public class DwgcAdapter extends BaseAdapter {
	private TbgcActivity context;
	public DwgcAdapter(TbgcActivity context) {
  		super();
 		this.context = context;
 	 }

	context.diaoyong();
}

你可能感兴趣的:(android)