Code example for NumberPicker

Methods: clearFocusgetValue

0
		builder.setTitle(R.string.title_specify_difficulty);
		builder.setView(numPicker);
		builder.setPositiveButton(R.string.ok, new OnClickListener() {
			@Override 
			public void onClick(DialogInterface dialog, int which) {
				numPicker.clearFocus();
				mListener.onSpecificDifficultyChosen(numPicker.getValue());
			} 
		}); 
		builder.setNegativeButton(R.string.cancel, null);
		return builder.create();
	} 
 
	////////////////////////////////////////////////////////////////////////// 
	// Listener 
 
	public interface SpecifyDifficultyDialogFragmentListener { 
		public void onSpecificDifficultyChosen(int targetWinPercent);
	} 
 
}