title: How to Call onActivityResult in adapter listview?
body: <p>i'm learning how to change Single item with resultActivity in  in my custom Adapter listview. how it's can work ?</p>
  
  <p>this my code when startActivityForResult in custom adapter listview </p>
  
  <pre><code>holder.isi_layout.setOnClickListener(new android.view.View.OnClickListener(){
  
          public void onClick(View v) 
          {
  
                              Intent i = null;                                
                              i = new Intent(activity, DetailLaporanActivity.class);                              
                              Bundle b = new Bundle();
                              b.putString("position", Integer.toString(position));
  
                              i.putExtras(b);
                              activity.startActivityForResult(i, mRequestCode);                                  
                              activity.overridePendingTransition (R.anim.push_left_in, R.anim.push_left_out);
  
  
          }
      });                
  </code></pre>
  
  <p>and this OnResultActivity</p>
  
  <pre><code>    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
          if (requestCode==mRequestCode) {
              if(resultCode == RESULT_OK){
                  String position = data.getStringExtra("position");
                  String status_favorite = data.getStringExtra("status_favorite");
                  String jumlah_favorite = data.getStringExtra("jumlah_favorite");
                  String jumlah_komentar = data.getStringExtra("jumlah_komentar");
              }
  
              Toast.makeText(getApplicationContext(), "This code Success get Result", Toast.LENGTH_LONG).show();
          }
      }
  </code></pre>
  
  <p>When i put OnResultActivity in Adapter, code is error, <strong>RESULT_OK</strong> get notice <strong>Cannot be resolved to a variable</strong>,</p>
  
  <p>but if i put in MainActivity , this not error but not get value result, i check with <strong>Toast.makeText(getApplicationContext(), "This code Success get Result", Toast.LENGTH_LONG).show();</strong> but no toast,....</p>
  
  <p>anybody help me ? how it's work ?
  sorry, for my english...</p>