- public class MySimpleAdapter extends SimpleAdapter {
- public MySimpleAdapter(Context context, List<? extends Map<String, ?>> data, int resource, String[] from, int[] to) {
- super(context, data, resource, from, to);
- }
- @Override
- public View getView(int position,View convertView, ViewGroup parent) {
- convertView = super.getView(position, convertView, parent);
- Button buttonAdd = (Button) convertView.findViewById(R.id.btnOrder);
- TextView tv1 = (TextView) convertView.findViewById(R.id.lblRoomType);
- final String roomType = tv1.getText().toString();
- buttonAdd.setOnClickListener(new View.OnClickListener() {
- public void onClick(View v) {
- //请问此处跳转下个页面该怎么写
- }
- });
- return convertView;
- }
- }
复制代码 用这个是不行的,继承的SimpleAdapter里面都没startActivity
Intent intent = new Intent(Context packageContext, Class<?> cls);
startActivity(intent);
请指点~
|
|