title: Perform click event on Spinner to execute code in onItemSelected
body: <p>I want to perform a click on a Spinner element automatically after my activity has been loaded completely.</p>
  
  <p>I use this code to set up the spinner and adapter:</p>
  
  <pre><code>public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_read_data);
          getActionBar().setDisplayHomeAsUpEnabled(true);
  
          mSpinnerDay = (Spinner) mTable.findViewById(R.id.spieltag_choice);
          mAdapterSpinnerDay = new ArrayAdapter&lt;CharSequence&gt;(this, R.layout.custom_spinner);
          mAdapterSpinnerDay.setDropDownViewResource(R.layout.custom_spinner);
          mSpinnerDay.setAdapter(mAdapterSpinnerDay);
  
  
  }
  
  
      private void setUpSpinnerListener(final IGameData data) {
      mSpinnerDay.post(new Runnable() {
          public void run() {
          mSpinnerDay.setOnItemSelectedListener(new OnItemSelectedListener() {
              public void onItemSelected(AdapterView&lt;?&gt; adapterView, View view, int i, long l) {
              for (GameDayData d : data.getGameDay()) {
                  if (d.getName().equals(adapterView.getSelectedItem().toString())) {
                  TableRow row = (TableRow) mTable.findViewById(R.id.row_punkte_tag);
                  TextView t = (TextView) row.findViewById(R.id.punkte_tag);
                  t.setText("Punkte: " + d.getScore());
                  TableRow row2 = (TableRow) mTable.findViewById(R.id.row_position_tag);
                  TextView t2 = (TextView) row2.findViewById(R.id.position_tag);
                  t2.setText("Position: " + d.getPosition());
                  return;
                  }
              }
              }
  
              public void onNothingSelected(AdapterView&lt;?&gt; adapterView) {
              return;
              }
          });
          }
      });
  }
  
  public void onTeamCheckReadComplete(IGameData data) {
      for (GameDayData d : data.getGameDay()) {
          mAdapterSpinnerDay.add(d.getName());
      }
  }
  </code></pre>
  
  <p>I try to perform the click with following code after I have set the adapter to the spinner:</p>
  
  <pre><code>mSpinnerDay.setSelection(0, true);
      View view = (View)  mSpinnerDay.getChildAt(0);
      long id = mSpinnerDay.getAdapter().getItemId(0);
      mSpinnerDay.performItemClick(view, 0, id);
  </code></pre>
  
  <p>But this does not work. Could somebody tell me how I can perfom a click on a spinner element automatically? When I select the spinner item over touch event in the application everything works fine.</p>
  
  <p>Regards,
  Sandro</p>