Retrieve item from Spinner and put Some conditions
<p>i have 2 arrays first for Hours and second for minutes, this is my arrays declare it in  string.xml</p>

<pre><code>   ` &lt;string-array name="feedbacktypelist"&gt;
    &lt;item&gt;@string/hr0&lt;/item&gt;  
    &lt;item&gt;@string/hr1&lt;/item&gt;  
    &lt;item&gt;@string/hr2&lt;/item&gt;  

&lt;/string-array&gt;

&lt;string-array name="array2"&gt;
    &lt;item&gt;@string/min5&lt;/item&gt;  
    &lt;item&gt;@string/min10&lt;/item&gt;  
    &lt;item&gt;@string/min15&lt;/item&gt;  
    &lt;item&gt;@string/min20&lt;/item&gt;  
    &lt;item&gt;@string/min25&lt;/item&gt;  
    &lt;item&gt;@string/min30&lt;/item&gt;
    &lt;item&gt;@string/min35&lt;/item&gt;  
    &lt;item&gt;@string/min40&lt;/item&gt;  
    &lt;item&gt;@string/min45&lt;/item&gt;
    &lt;item&gt;@string/min50&lt;/item&gt;  
    &lt;item&gt;@string/min55&lt;/item&gt;  
    &lt;item&gt;@string/min59&lt;/item&gt;


&lt;/string-array&gt;`
</code></pre>

<p>and this is my code in java</p>

<pre><code>  package lmp.app.pkg;

  import android.app.Activity;
  import android.app.ProgressDialog;
  import android.content.Intent;
  import android.database.Cursor;
  import android.graphics.Bitmap;
  import android.net.Uri;
  import android.os.Bundle;
  import android.provider.MediaStore;
  import android.view.View;
  import android.widget.AdapterView;
  import android.widget.AdapterView.OnItemSelectedListener;
  import android.widget.ArrayAdapter;
  import android.widget.Button;
  import android.widget.EditText;
  import android.widget.ImageView;
  import android.widget.RadioGroup;
  import android.widget.RadioGroup.OnCheckedChangeListener;
  import android.widget.Spinner;
  import android.widget.TextView;
  import android.widget.Toast;

  public class CreateNewForm extends Activity implements OnItemSelectedListener  {


Button Browse;
ImageView  CasePic;
Spinner CaseDurationH, CaseDurationM;
TextView tesst;
RadioGroup GenderSelection;
EditText CaseName, CaseClothes, CaseMoreInfo, CaseAge;
Button Next;
//For Browsering Picture 
private static final int SELECT_PICTURE = 1;
private String selectedImagePath;

@Override
protected void onCreate(Bundle savedInstanceState) 
{

    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    setContentView(R.layout.create_new_form);

    //To Call initializer Function 
    initializer();

    //j list

    // 1-For Uploading Picture
    Browse.setOnClickListener(new View.OnClickListener() {

        public void onClick(View v) {
            // TODO Auto-generated method stub
             // in onCreate or any event where your want the user to
            // select a file
            Intent intent = new Intent();
            intent.setType("image/*");
            intent.setAction(Intent.ACTION_GET_CONTENT);
            startActivityForResult(Intent.createChooser(intent,
                    "Select Picture"), SELECT_PICTURE);
        }
    });

    // 1-Name
    final MyCase case1 = new MyCase();
    case1.setName(CaseName.getText().toString());

    // 2-Gender For Group Radio
    GenderSelection.clearCheck();
    GenderSelection.setOnCheckedChangeListener(new OnCheckedChangeListener() {

        public void onCheckedChanged(RadioGroup group, int checkedId) {
             switch (checkedId) {
            case R.id.radio0:
                case1.setGender("Male");
                break;
            case R.id.radio1:
                case1.setGender("Female");
                break;
            default:
                break;
            }

        }
    });

    //3-Age

     String age = CaseAge.getText().toString();


    /*int tstnum =case1.getAge();
    tesst.setText(tstnum); */

     //4-Duration Time
    ArrayAdapter&lt;CharSequence&gt; adapter = ArrayAdapter.createFromResource(
            this, R.array.feedbacktypelist, android.R.layout.simple_spinner_item);
    adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    CaseDurationH.setAdapter(adapter);


    //5-Case Clothes
    case1.setClothes(CaseClothes.getText().toString());

    //6-Case More Information
    case1.setMoreInfo(CaseMoreInfo.getText().toString());

    //Move to 2nd form page
    Next= (Button)findViewById(R.id.Next2);
    Next.setOnClickListener(new View.OnClickListener() {

        public void onClick(View v) { 
            switch (v.getId()) { 
            case R.id.Next2:
                try
                {
                     Intent k = new Intent(CreateNewForm.this, CreateNewForm_2.class);

                     startActivity(k);

                }catch(Exception e){

                }

                break;

            }
        }
            });



  //Spinner
    CaseDurationH.setOnItemSelectedListener(new OnItemSelectedListener() {
        int i =CaseDurationH.getSelectedItemPosition();
        public void onItemSelected(AdapterView&lt;?&gt; parent, View view, int pos, long id) {
            int i = CaseDurationH.getSelectedItemPosition();

            if(i==2){
                CaseDurationM.setEnabled(false);
            }
            String str = parent.getSelectedItem().toString();

            if(str.equals("hr0"))
                    {

                }

            if(str.equals("hr1"))
                    {

                }


            if(str.equals("hr2"))
                    {
                CaseDurationM.setEnabled(false);  
                }



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

        } });

}


// To initialize the variables 
private void initializer() {
    // TODO Auto-generated method stub
    //This information will be filled by a user
            //CasePic = (ImageView) findViewById(R.id.imageView1);
            CaseName= (EditText) findViewById(R.id.caseNm);
            GenderSelection= (RadioGroup) findViewById(R.id.radioGroup1);
            CaseAge= (EditText) findViewById(R.id.caseaage);
            tesst= (TextView) findViewById(R.id.textView8);
            CaseDurationH= (Spinner) findViewById(R.id.Shr);
            CaseDurationM= (Spinner) findViewById(R.id.Smin);
            CaseClothes= (EditText) findViewById(R.id.caseClothes);
            CaseMoreInfo= (EditText) findViewById(R.id.caseMrInfo);
            CasePic = (ImageView) findViewById(R.id.casepic);
            Browse = (Button) findViewById(R.id.browseCasePic);
}


//For Uploading Picture
public void onActivityResult(int requestCode, int resultCode, Intent data) {
    if (resultCode == RESULT_OK) {
        if (requestCode == SELECT_PICTURE) {
            Uri selectedImageUri = data.getData();
            selectedImagePath = getPath(selectedImageUri);
        }
    }
}

//For Uploading Picture
public String getPath(Uri uri) {
    String[] projection = { MediaStore.Images.Media.DATA };
    Cursor cursor = managedQuery(uri, projection, null, null, null);
    int column_index = cursor
            .getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
    cursor.moveToFirst();
    return cursor.getString(column_index);
}


public void onItemSelected(AdapterView&lt;?&gt; arg0, View arg1, int arg2,
        long arg3) {
    // TODO Auto-generated method stub

}


public void onNothingSelected(AdapterView&lt;?&gt; arg0) {
    // TODO Auto-generated method stub

}


}
</code></pre>

<p>i want:
1- retrieve the item in spinner that the user choose it, not the positon 
2-if the user choose from spinner1 the item "hr02" then the spinner2 will disable</p>

<p>Thank you for help me, StackOverFlow members your my hero now! :")</p>
