// for java version numberPicker.setFormatter(new NumberPicker.Formatter() { @Override public String format(int i) { return String.format("%02d", i); } });