@Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.activity_store_order_add_goods);
   setTitleText("选择商品");
   instance = this;
   showBackbtn();
   findView();
   store_add_goods_lv.setMode(Mode.PULL_FROM_START);
   getResult();
   store_add_goods_lv.setRefreshing();
 }
 @Override
 protected void onActivityResult(int requestCode, int resultCode, Intent data) {
   super.onActivityResult(requestCode, resultCode, data);
   if (resultCode == RESULT_OK) {
     findParameter = data.getStringExtra(Constants.DEVICE_CODE);
     input.setText(findParameter);
     currentPage = 1;
     store_add_goods_lv.setMode(Mode.PULL_FROM_START);
     getResult();
     store_add_goods_lv.setRefreshing();
   }
 }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.setting_payway);
    setTitle(R.string.setting_payway);

    ListView list = (ListView) findViewById(R.id.setting_payway_list);
    mAdapter = new PayWayAdapter(this);
    list.setAdapter(mAdapter);
    list.setOnItemClickListener(this);

    findViewById(R.id.setting_payway_help).setOnClickListener(this);
    findViewById(R.id.setting_payway_add).setOnClickListener(this);
  }
  @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);

    if (resultCode == RESULT_OK) {
      PayWayElement e =
          (PayWayElement) data.getSerializableExtra(PayWayShowOrCreateActivity.PAYWAY_DATA);
      if (CHANGE_PAYWAY == requestCode) {
        mAdapter.changeElement(e);
      } else if (CREATE_NEW_PAYWAY == requestCode) {
        mAdapter.addElement(e);
      }
    } else if (resultCode == PayWayShowOrCreateActivity.PAYWAY_DELETE) { // 仅在CHANGE_PAYWAY时发生
      PayWayElement e =
          (PayWayElement) data.getSerializableExtra(PayWayShowOrCreateActivity.PAYWAY_DATA);
      mAdapter.deleteElement(e.mPosition);
    }
  }