本文整理汇总了Java中com.wdullaer.materialdatetimepicker.date.DatePickerDialog.setTitle方法的典型用法代码示例。如果您正苦于以下问题:Java DatePickerDialog.setTitle方法的具体用法?Java DatePickerDialog.setTitle怎么用?Java DatePickerDialog.setTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.wdullaer.materialdatetimepicker.date.DatePickerDialog
的用法示例。
在下文中一共展示了DatePickerDialog.setTitle方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: dobDatePick
import com.wdullaer.materialdatetimepicker.date.DatePickerDialog; //导入方法依赖的package包/类
private void dobDatePick(){
Calendar now = Calendar.getInstance();
now.setTimeInMillis(date_of_Birth);
DatePickerDialog dpd = DatePickerDialog.newInstance(
new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePickerDialog view, int year, int monthOfYear, int dayOfMonth) {
date_of_Birth = AdditionalFunc.getMilliseconds(year, monthOfYear+1, dayOfMonth);
isSelectDob = true;
setDateText(dob, AdditionalFunc.getDateString(date_of_Birth));
}
},
now.get(Calendar.YEAR),
now.get(Calendar.MONTH),
now.get(Calendar.DAY_OF_MONTH)
);
dpd.setTitle(getString(R.string.dob));
dpd.setVersion(DatePickerDialog.Version.VERSION_2);
dpd.show(getFragmentManager(), "Datepickerdialog");
}
示例2: startDatePick
import com.wdullaer.materialdatetimepicker.date.DatePickerDialog; //导入方法依赖的package包/类
private void startDatePick(){
Calendar now = Calendar.getInstance();
now.setTimeInMillis(start_Date);
DatePickerDialog dpd = DatePickerDialog.newInstance(
new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePickerDialog view, int year, int monthOfYear, int dayOfMonth) {
start_Date = AdditionalFunc.getMilliseconds(year, monthOfYear+1, dayOfMonth);
isSelectStartDate = true;
setDateText(startdate, AdditionalFunc.getDateString(start_Date));
}
},
now.get(Calendar.YEAR),
now.get(Calendar.MONTH),
now.get(Calendar.DAY_OF_MONTH)
);
dpd.setTitle(getString(R.string.location_start_date));
dpd.setVersion(DatePickerDialog.Version.VERSION_2);
dpd.show(getFragmentManager(), "Datepickerdialog");
}
示例3: startDatePick
import com.wdullaer.materialdatetimepicker.date.DatePickerDialog; //导入方法依赖的package包/类
private void startDatePick(){
Calendar now = Calendar.getInstance();
now.setTimeInMillis(start_Date);
DatePickerDialog dpd = DatePickerDialog.newInstance(
new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePickerDialog view, int year, int monthOfYear, int dayOfMonth) {
start_Date = AdditionalFunc.getMilliseconds(year, monthOfYear+1, dayOfMonth);
isSelectStartDate = true;
setDateText(startdate, AdditionalFunc.getDateString(start_Date));
}
},
now.get(Calendar.YEAR),
now.get(Calendar.MONTH),
now.get(Calendar.DAY_OF_MONTH)
);
dpd.setTitle(getString(R.string.startdate));
dpd.setVersion(DatePickerDialog.Version.VERSION_2);
dpd.show(getFragmentManager(), "Datepickerdialog");
}
示例4: startDatePick
import com.wdullaer.materialdatetimepicker.date.DatePickerDialog; //导入方法依赖的package包/类
private void startDatePick(){
Calendar now = Calendar.getInstance();
DatePickerDialog dpd = DatePickerDialog.newInstance(
new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePickerDialog view, int year, int monthOfYear, int dayOfMonth) {
start_Date = AdditionalFunc.getMilliseconds(year, monthOfYear+1, dayOfMonth);
isSelectStartDate = true;
setDateText(startdate, AdditionalFunc.getDateString(start_Date));
registerDatePick();
}
},
now.get(Calendar.YEAR),
now.get(Calendar.MONTH),
now.get(Calendar.DAY_OF_MONTH)
);
dpd.setTitle(getString(R.string.startdate));
dpd.setVersion(DatePickerDialog.Version.VERSION_2);
dpd.show(getFragmentManager(), "Datepickerdialog");
}
示例5: registerDatePick
import com.wdullaer.materialdatetimepicker.date.DatePickerDialog; //导入方法依赖的package包/类
private void registerDatePick(){
Calendar now = Calendar.getInstance();
DatePickerDialog dpd = DatePickerDialog.newInstance(
new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePickerDialog view, int year, int monthOfYear, int dayOfMonth) {
register_Date = AdditionalFunc.getMilliseconds(year, monthOfYear+1, dayOfMonth);
isSelectRegisterDate = true;
setDateText(registerdate, AdditionalFunc.getDateString(register_Date));
dobDatePick();
}
},
now.get(Calendar.YEAR),
now.get(Calendar.MONTH),
now.get(Calendar.DAY_OF_MONTH)
);
dpd.setTitle(getString(R.string.registerdate));
dpd.setVersion(DatePickerDialog.Version.VERSION_2);
dpd.show(getFragmentManager(), "Datepickerdialog");
}
示例6: dobDatePick
import com.wdullaer.materialdatetimepicker.date.DatePickerDialog; //导入方法依赖的package包/类
private void dobDatePick(){
Calendar now = Calendar.getInstance();
DatePickerDialog dpd = DatePickerDialog.newInstance(
new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePickerDialog view, int year, int monthOfYear, int dayOfMonth) {
date_of_Birth = AdditionalFunc.getMilliseconds(year, monthOfYear+1, dayOfMonth);
isSelectDob = true;
setDateText(dob, AdditionalFunc.getDateString(date_of_Birth));
}
},
now.get(Calendar.YEAR),
now.get(Calendar.MONTH),
now.get(Calendar.DAY_OF_MONTH)
);
dpd.setTitle(getString(R.string.dob));
dpd.setVersion(DatePickerDialog.Version.VERSION_2);
dpd.show(getFragmentManager(), "Datepickerdialog");
}
示例7: selectStartPeriod
import com.wdullaer.materialdatetimepicker.date.DatePickerDialog; //导入方法依赖的package包/类
private void selectStartPeriod(){
Calendar now = Calendar.getInstance();
DatePickerDialog dpd = DatePickerDialog.newInstance(
new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePickerDialog view, int year, int monthOfYear, int dayOfMonth) {
startDate = AdditionalFunc.getMilliseconds(year, monthOfYear+1, dayOfMonth);
isSelectStartDate = true;
setDateText(startPeriodBtn, AdditionalFunc.getDateString(startDate));
checkSaveBtn();
selectFinishPeriod();
}
},
now.get(Calendar.YEAR),
now.get(Calendar.MONTH),
now.get(Calendar.DAY_OF_MONTH)
);
dpd.setTitle(getString(R.string.take_period_start_srt));
dpd.setVersion(DatePickerDialog.Version.VERSION_2);
dpd.show(getFragmentManager(), "Datepickerdialog");
}
示例8: selectFinishPeriod
import com.wdullaer.materialdatetimepicker.date.DatePickerDialog; //导入方法依赖的package包/类
private void selectFinishPeriod(){
Calendar now = Calendar.getInstance();
DatePickerDialog dpd = DatePickerDialog.newInstance(
new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePickerDialog view, int year, int monthOfYear, int dayOfMonth) {
finishDate = AdditionalFunc.getMilliseconds(year, monthOfYear+1, dayOfMonth);
isSelectFinishDate = true;
setDateText(finishPeriodBtn, AdditionalFunc.getDateString(finishDate));
checkSaveBtn();
}
},
now.get(Calendar.YEAR),
now.get(Calendar.MONTH),
now.get(Calendar.DAY_OF_MONTH)
);
dpd.setTitle(getString(R.string.take_period_finish_srt));
dpd.setVersion(DatePickerDialog.Version.VERSION_2);
dpd.show(getFragmentManager(), "Datepickerdialog");
}
示例9: showDatePicker
import com.wdullaer.materialdatetimepicker.date.DatePickerDialog; //导入方法依赖的package包/类
/**
* Show the date picker
*/
private void showDatePicker(final EditText birthdayEditText) {
DatePickerDialog.OnDateSetListener listener = new DatePickerDialog.OnDateSetListener() {
/**
* Handle selected time for birthday
* @param view - the current view
* @param year - the selected year
* @param monthOfYear - the selected month
* @param dayOfMonth - the selected day
*/
@Override
public void onDateSet(DatePickerDialog view, int year, int monthOfYear, int dayOfMonth) {
mBirthday.set(year, monthOfYear, dayOfMonth);
SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy", Locale.US);
birthdayEditText.setText(dateFormat.format(mBirthday.getTime()));
}
};
DatePickerDialog datePickerDialog = DatePickerDialog.newInstance(listener,
mBirthday.get(Calendar.YEAR), mBirthday.get(Calendar.MONTH),
mBirthday.get(Calendar.DAY_OF_MONTH));
datePickerDialog.setVersion(DatePickerDialog.Version.VERSION_2);
datePickerDialog.setTitle(getActivity().getString(R.string.set_birthday));
datePickerDialog.vibrate(false);
datePickerDialog.dismissOnPause(true);
datePickerDialog.setOnDateSetListener(listener);
datePickerDialog.show(getActivity().getFragmentManager(), "date_picker");
}