Code example for Spinner

Methods: getSelectedItemId

	public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2,
			long arg3) {
		// TODO Auto-generated method stub 
		long selected_position = lang.getSelectedItemId();
		position = (int) selected_position;
		Locale[] locale = Locale.getAvailableLocales();		
		Toast toast = Toast.makeText(getApplicationContext(), locale[(int) position].getDisplayLanguage() , Toast.LENGTH_SHORT);;
		//mTts.setLanguage(locale	); 
	public void onNothingSelected(AdapterView<?> arg0) {
		// TODO Auto-generated method stub 
Connect your IDE to all the code out there  Get Codota for Java