how to assign order in spinner selection android
<p>i am able to show 4 spinner in my view ..now i want to assign the order to selection on spinner means if i had selected first spinner then only i can select 2nd spinner value otherwise it gives a alert message 
and so on..so how to assign order of selection for spinner??pls help me thanks a lot..
i am attaching my code below..</p>

<pre><code>     ArrayList&lt;String&gt; aa=  MainMenu.ciudad1;
     final Spinner ct = (Spinner) findViewById(R.id.Spinner02);
     ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(this, 
         android.R.layout.simple_spinner_item, aa);
     ct.setAdapter(adapter);
     **ct.setEnabled(false);**


         ArrayList&lt;String&gt; estado = MainMenu.estado1;


     final Spinner estaddo = (Spinner) findViewById(R.id.Spinner03);
     ArrayAdapter&lt;String&gt; adapterestado = new ArrayAdapter&lt;String&gt;(this, android.R.layout.simple_spinner_item,estado);
     estaddo.setAdapter(adapterestado);
     estaddo.setEnabled(false);
     ArrayList&lt;String&gt; barrio = MainMenu.barrio1;


     final Spinner barrio11 = (Spinner) findViewById(R.id.Spinner04);
     ArrayAdapter&lt;String&gt; adapterbarrio = new ArrayAdapter&lt;String&gt;(this, 
         android.R.layout.simple_spinner_item, barrio);
     barrio11.setAdapter(adapterbarrio);
     **barrio11.setEnabled(false);**
         ArrayList&lt;String&gt; type = MainMenu.type;
         Spinner type1 = (Spinner) findViewById(R.id.Spinner01);
     ArrayAdapter&lt;String&gt; adaptertype= new ArrayAdapter&lt;String&gt;(this, 
         android.R.layout.simple_spinner_item, type);
     type1.setAdapter(adaptertype);
     **type1.setEnabled(true);**

     type1.setOnItemSelectedListener(
                new  AdapterView.OnItemSelectedListener() {           

           @Override
           public void onItemSelected(AdapterView&lt;?&gt; parent, 
             View view, int position, long id) 
           {
               Spinner type1 = (Spinner) findViewById(R.id.Spinner01);
               typeselected = (String)type1.getSelectedItem();
               estaddo.setEnabled(true);

               System.out.println("type selected............:" + typeselected);

           }
                @Override
                public void onNothingSelected(AdapterView&lt;?&gt; parent)
                {


                }
 });
     ct.setOnItemSelectedListener(
                new  AdapterView.OnItemSelectedListener() {           

           @Override
           public void onItemSelected(AdapterView&lt;?&gt; parent, 
             View view, int position, long id) 
           {

                Spinner ct = (Spinner) findViewById(R.id.Spinner02);
                cityselected = (String)ct.getSelectedItem();
                barrio11.setEnabled(true);

              System.out.println("city selected............:" + cityselected);

           }
                @Override
                public void onNothingSelected(AdapterView&lt;?&gt; parent) {

                }
 });
</code></pre>

<p>//       Spinner estaddo = (Spinner) findViewById(R.id.Spinner03);</p>

<pre><code>             estaddo.setOnItemSelectedListener(
                new  AdapterView.OnItemSelectedListener() {           

           @Override
           public void onItemSelected(AdapterView&lt;?&gt; parent, 
             View view, int position, long id) 
           {

               Spinner estaddo = (Spinner) findViewById(R.id.Spinner03);
               stateselected = (String)estaddo.getSelectedItem();
               ct.setEnabled(true);
               barrio11.setEnabled(false);
               System.out.println("state selected............:" + stateselected);


           }
                @Override
                public void onNothingSelected(AdapterView&lt;?&gt; parent) {
                    // TODO Auto-generated method stub

                }
 });
    // Spinner barrio = (Spinner) findViewById(R.id.Spinner04);
     barrio11.setOnItemSelectedListener(
                new  AdapterView.OnItemSelectedListener() {           

           @Override
           public void onItemSelected(AdapterView&lt;?&gt; parent, 
             View view, int position, long id) 
           {

               Spinner barrio = (Spinner) findViewById(R.id.Spinner04);
              neighbourselected = (String)barrio.getSelectedItem();
              System.out.println("neighbour selected............:" + neighbourselected);


           }
                @Override
                public void onNothingSelected(AdapterView&lt;?&gt; parent) {
                    // TODO Auto-generated method stub

                }
 });
</code></pre>
