내가 설명으로 DatePickerDialog
에 문제가 많은이 게시물 Jelly Bean DatePickerDialog --- is there a way to cancel?에가 알고 있지만 내 문제는 내가 만 표시 대신에 두 개의 버튼의 확인 버튼을 원하는 것입니다. 나는이 같은 DialogFragment
에 DatePickerDialog
를 사용안드로이드 DatePickerDialog 디스플레이 하나의 버튼
public class DateDialog extends DialogFragment implements DatePickerDialog.OnDateSetListener {
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
// Use the current date as the default date in the picker
final Calendar c = Calendar.getInstance();
int year = c.get(Calendar.YEAR);
int month = c.get(Calendar.MONTH);
int day = c.get(Calendar.DAY_OF_MONTH);
// set up mindate
minYear = year;
minMonth = month;
minDay = day;
// Create a new custom instance of DatePickerDialog and return it
return new CustomDatePickerDialog(getActivity(), this, year, month, day);
}
}
를 확장 내
CustomDatePickerDialog
의 workaraound은? –기본 시스템 datepicker에는 두 개의 버튼이 있습니다. 단 하나의 버튼 만 갖고 싶다면 커스텀 날짜 선택 도구를 사용할 수 있습니다. – Hariharan
@StefanoMunarini 예 – mrroboaat