title: Call onAcitivityResult in BaseAdapter
body: <p>I pass a parameter from a second activity to the first activity but the program doesn't enter the method onActivityResult that is in the first activity and it doesn't anything.</p>
  
  <p>In my first Acitivity I have 2 clases.
  The first one I do a query and I call the second class ListAdapter:</p>
  
  <pre><code>public class view_records extends Activity {
     public void getProduct() { 
     comandSQL = "Select * from Inventario";      
     try {
      Statement statement = MainActivity.connect.createStatement();
      rs = statement.executeQuery(comandSQL);
      ArrayList&lt;product_model&gt; product_list = new ArrayList&lt;product_model&gt;();
      String tidno = "", tdesc = "";
          while(rs.next()){  
              tidno = rs.getString("No_");
              tdesc = rs.getString("Descripción Completa");
                  product_model _ProductModel = new product_model();
               _ProductModel.setIdno(tidno);
               _ProductModel.setProductDesc(tdesc);
               _productlist.add(_ProductModel);
          }
          listview.setAdapter(new ListAdapter(this));
  
  } catch (Exception e) {
      Log.e("ERROR",e.getMessage());
      }  
  </code></pre>
  
  <p>} 
  `</p>
  
  <p>In the Second Class I call a second activity</p>
  
  <pre><code>private class ListAdapter extends BaseAdapter {
      LayoutInflater inflater;
      ViewHolder viewHolder;
      int request_code = 1;
  
      @Override
      public View getView(int position, View convertView, ViewGroup parent) {
          if (convertView == null) {
              convertView = inflater.inflate(R.layout.modelo_productos, null);
          viewHolder = new ViewHolder();
  
          viewHolder.txt_prod = (TextView) convertView.findViewById(R.id.tv_productos);
              viewHolder.txt_desc = (TextView) convertView.findViewById(R.id.tv_desc);
  
              convertView.setTag(viewHolder);
          } else {
              viewHolder = (ViewHolder) convertView.getTag();
          }
  
          viewHolder.txt_prod.setText(_productlist.get(position).getIdno().trim());
          viewHolder.txt_desc.setText(_productlist.get(position).getProductDesc().trim());
  
          final int temp = position;
  
          (convertView.findViewById(R.id.bt_modificar)).setOnClickListener(new OnClickListener() {
                      public void onClick(View arg0) {
                          modificarProd(temp);
                      }
                  });
          return convertView;
      }
  
  
      protected void modificarProd(int temp)
      {
          String pos = Integer.toString(temp);
  
          String _productid = String.valueOf(_productlist.get(temp).getIdno());
          String _productdesc = _productlist.get(temp).getProductDesc();
  
          Intent intent = new Intent(getApplicationContext(), modificar_productos.class);
          Bundle bundle = new Bundle();
          bundle.putString("id", _productid);
          bundle.putString("desc", _productdesc);
              bundle.putString("pos", pos);
          intent.putExtras(bundle);
          startActivityForResult(intent, request_code);
      }
  
      protected void onActivityResult(int requestCode, int resultCode, Intent data){
          if (RESULT_OK == request_code){
              String result = data.getStringExtra("pos");
              _productlist.remove(result);
              notifyDataSetChanged();
          }
       }
  
  }
  
  private class ViewHolder {
      TextView txt_desc;
      Button btOK;
      int position;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>And this is part of the Second Activity</p>
  
  <pre><code>public class modificar_productos extends Activity implements OnClickListener {
  String pos;
  double costo;
  Intent i;
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      // TODO Auto-generated method stub
      super.onCreate(savedInstanceState);
      setContentView(R.layout.modificar_productos);
  
      i = getIntent();
  
      tvProd = (TextView) findViewById(R.id.tv_prod);
      tvDesc = (TextView) findViewById(R.id.tv_desc);
  
              tvProd.setText(i.getExtras().getString("id"));
      tvDesc.setText(i.getExtras().getString("desc"));
      pos = i.getExtras().getString("pos");
      btGuardar = (Button) findViewById(R.id.bt_guardar);
      btGuardar.setOnClickListener(this);
  }
  
  @Override
  public void onClick(View v) {
      // TODO Auto-generated method stub
      switch (v.getId()) {
      case R.id.bt_guardar:
          if (etCant.getText().toString().equals("")) {
              Toast.makeText(modificar_productos.this, "Por favor, ingrese la cantidad",Toast.LENGTH_LONG).show();
          } else {
  
            Intent data = new Intent();
            data.putExtra("pos",pos);
            setResult(RESULT_OK, data);
            finish();
          }
          break;
      }
  }
  </code></pre>
  
  <p>}</p>