Code example for ListPreference

Methods: setEnabled

0
			 else { 
				pref.setSummary("Mayor presici�n, mayor consumo de energ�a");
			 } 
	  } else { 
		  	if (pref.isChecked() ) 			// Habilita o deshabilita el elemento de la preferenceActivity
				 batteryAct.setEnabled(true);
		  	else 
				 batteryAct.setEnabled(false);
		 } 
	  } 
		 
} 
Contextual code suggestions in your IDE  Get Codota for Java