Code example for AlertDialog.Builder

Methods: setSingleChoiceItems

0
		{ 
			throw new IllegalStateException("SnoozePreference requires an entries array.");
		} 
		mVolume = mSettings.getVolume();
		int index = Math.min(Math.max((mVolume - 50) / 10, 0), entries.length - 1);
		builder.setSingleChoiceItems(entries, index, new DialogInterface.OnClickListener()
		{ 
			public void onClick(DialogInterface dialog, int which)
			{ 
				mVolume = which * 10 + 50;
			} 
		}); 
	} 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE