title: Android: Get the element triggering an onclick event
body: <p>Here is my Code:</p>
  
  <pre><code>ImageButton ibtnCherry;
  ImageButton ibtnSelected;
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.setup);
  
      ibtnCherry = (ImageButton)findViewById(R.id.ibtnCherry);
  
      ibtnCherry.setOnClickListener(this);
  }
  </code></pre>
  
  <p>onClick:</p>
  
  <pre><code>@Override
  public void onClick(View view) {
      ibtnSelected = ??????????;
      Intent sdintent = new Intent(Intent.ACTION_PICK);
      sdintent.setType("image/*");
      sdintent.setAction(Intent.ACTION_GET_CONTENT);
      startActivityForResult(sdintent, GlobaleVariablen.SD_REQUEST);
  }
  </code></pre>
  
  <p>My Problem is, that I need something like "ibtnSelected = ibtnCherry" in the row with the questionmarks, but dynamically, so when another button (e.g. ibtnTmp) fires the same onClick event, ibtnTmp is saved in ibtnSelected.</p>
  
  <p>Is there any chance to get the element in the onClick event that fires it?</p>