Apps edittext has to go enable from disable after select the particular item in the list of spinner

ezhil

Lurker
hi every one,

My code:

Code:
	 String[] Items = {
	            "Alarm",
	            "Office",
	            "Meeting",
	            "Party",
	            "Lunch",
	            "Breakfast",
	            "Supper",
	            "Home",
	            "Private",
	            "Outdoor",
	            "Family",
	            "Friends",
	            "Others"
	    };
	 
	    Spinner s1;
and
Code:
        s1 = (Spinner) findViewById(R.id.spinner);
        
        ArrayAdapter<String> adapter  = new ArrayAdapter<String>(
                this,
                android.R.layout.simple_spinner_dropdown_item, 
                Items);
 
        s1.setAdapter(adapter);
        s1.setOnItemSelectedListener(new OnItemSelectedListener()
        {
            public void onItemSelected(AdapterView<?> arg0, 
            View arg1, int arg2, long arg3) 
            {
                int index = s1.getSelectedItemPosition();
                Toast.makeText(getBaseContext(), 
                    "You have selected item : " + Items[index], 
                    Toast.LENGTH_SHORT).show();                
            }
 
            public void onNothingSelected(AdapterView<?> arg0) {}
        });


In it if i select the item "others" in the spinner.... the edittext has to go enable otherwise it ll be a disable.the same the edittext to get item to add spinner...

any one can help me thank you
 
Top