title: Android spinner item selected default doesn't work
body: <p>in my app i have develop a filter fragment. In this fragment i have a checkbox with spinner list that if is a item selected he apply a filter on a json.
  Now this filter works fine if when app start is not check, but if i set checked by default not apply a filter
  this is my code:
  I have a flag with 0/1 value to set On Off checkbox:</p>
  
  <pre><code>public static int flag_position=1; // checkbox On when app start
  </code></pre>
  
  <p>and this code about spinner:</p>
  
  <pre><code>Spinner spinner1 = (Spinner) v.findViewById(R.id.spinner1);
      ArrayAdapter&lt;CharSequence&gt; positionAdapter = ArrayAdapter.createFromResource(
              getActivity(), R.array.array_name, android.R.layout.simple_list_item_1);
      positionAdapter.setDropDownViewResource(android.R.layout.simple_list_item_1);
      spinner1.setAdapter(positionAdapter);
      spinner1.setSelection(Lista.flag_distance=5);
  
  spinner1.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
          @Override
          public void onItemSelected(AdapterView&lt;?&gt; parentView, View selectedItemView, int position, long id) {
              // your code here
              Lista.flag_distance=position;
              Log.d("Car2go_flagqqq", String.valueOf(position));
          }
  
          @Override
          public void onNothingSelected(AdapterView&lt;?&gt; parentView) {
              // your code here
          }
  
      });
  </code></pre>
  
  <p>when app run the checkbox is On and item of spinner is set, but the filter is not apply on service. Instead if i click checkbox to Off and after again to On, he works.
  How i can works onItemSelected by default when start app?</p>
  
  <p>Thanks</p>