title: android java set fix default value for spinner
body: <p>I would like to have a fix value that is always displayed in the Spinner and when clicking on the Spinner this value should not be listed in the drop down selection.
  Until now I have the following</p>
  
  <pre><code>   Definition XML:
     &lt;Spinner
          android:layout_width="76dp"
          android:layout_height="40dp"
          android:id="@+id/right_shift"
          android:layout_row="0"
          android:layout_column="0"/&gt;
  
      Java:
      final Spinner right = (Spinner) findViewById(R.id.right_shift)
      ArrayList&lt;String&gt; rightShift = new ArrayList&lt;String&gt;();
  
      rightShift.add("  &gt;&gt;"); //THIS SHOULD BE THE VALUE THAT IS ALWAYS DISPLAYED
  
      for (int i=0; i&lt;5; i++)
          ...//add other values to arraylist
  
      ...//set values of arraylist to spinner
  
      right.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
          @Override
          public void onItemSelected(AdapterView&lt;?&gt; adapterView, View view, int i, long l) {
              right.setSelection(0);
          }
  
          @Override
          public void onNothingSelected(AdapterView&lt;?&gt; adapterView) {
          }
      });
  </code></pre>
  
  <p>But when clicking on the Spinner the preselected Item will again be shown in the drop down and the <code>right.setselection(0)</code> is not executed fast enough so I still see the selected Item for about 0.5sec... Is there an other/easier way to perform this?</p>