本文整理汇总了Java中com.android.datetimepicker.date.DatePickerDialog类的典型用法代码示例。如果您正苦于以下问题:Java DatePickerDialog类的具体用法?Java DatePickerDialog怎么用?Java DatePickerDialog使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DatePickerDialog类属于com.android.datetimepicker.date包,在下文中一共展示了DatePickerDialog类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: newInstance
import com.android.datetimepicker.date.DatePickerDialog; //导入依赖的package包/类
public static TimePickerDialog newInstance(OnTimeSetListener callback,
int hourOfDay, int minute, boolean is24HourMode, int styleId) {
TimePickerDialog ret = newInstance(callback, hourOfDay, minute, is24HourMode);
Bundle args = new Bundle();
args.putInt(DatePickerDialog.STYLE_ARG, styleId);
ret.setArguments(args);
return ret;
}
开发者ID:zhenghuiy,项目名称:TodayThing,代码行数:9,代码来源:TimePickerDialog.java
示例2: registerOnDateChangedListener
import com.android.datetimepicker.date.DatePickerDialog; //导入依赖的package包/类
@Override
public void registerOnDateChangedListener(DatePickerDialog.OnDateChangedListener listener) {
mListeners.add(listener);
}
开发者ID:timothymiko,项目名称:narrate-android,代码行数:5,代码来源:CalendarFragment.java
示例3: unregisterOnDateChangedListener
import com.android.datetimepicker.date.DatePickerDialog; //导入依赖的package包/类
@Override
public void unregisterOnDateChangedListener(DatePickerDialog.OnDateChangedListener listener) {
mListeners.remove(listener);
}
开发者ID:timothymiko,项目名称:narrate-android,代码行数:5,代码来源:CalendarFragment.java
示例4: updatePickers
import com.android.datetimepicker.date.DatePickerDialog; //导入依赖的package包/类
private void updatePickers() {
Iterator<DatePickerDialog.OnDateChangedListener> iterator = mListeners.iterator();
while (iterator.hasNext()) {
iterator.next().onDateChanged();
}
}
开发者ID:timothymiko,项目名称:narrate-android,代码行数:7,代码来源:CalendarFragment.java
示例5: onDateClicked
import com.android.datetimepicker.date.DatePickerDialog; //导入依赖的package包/类
@OnClick(R.id.date_holder)
public void onDateClicked() {
DatePickerDialog.newInstance(this, note.calendar.get(Calendar.YEAR),
note.calendar.get(Calendar.MONTH), note.calendar.get(Calendar.DAY_OF_MONTH))
.show(getFragmentManager(), "datePicker");
}
开发者ID:Ronak-LM,项目名称:memoir,代码行数:7,代码来源:ViewActivity.java
示例6: onDateSet
import com.android.datetimepicker.date.DatePickerDialog; //导入依赖的package包/类
@Override
public void onDateSet(DatePickerDialog dialog, int year, int monthOfYear, int dayOfMonth) {
note.calendar.set(year, monthOfYear, dayOfMonth);
refreshLayout();
}
开发者ID:Ronak-LM,项目名称:memoir,代码行数:6,代码来源:ViewActivity.java
示例7: onDateSet
import com.android.datetimepicker.date.DatePickerDialog; //导入依赖的package包/类
@Override
public void onDateSet(DatePickerDialog datePickerDialog, int year, int monthOfYear, int dayOfMonth) {
startTime.set(year, monthOfYear, dayOfMonth);
timeListener.onTimeChanged(startTime.getTimeInMillis() / 1000);
updateTimeViews();
}
开发者ID:FauDroids,项目名称:TripWeather,代码行数:7,代码来源:TimeInputAdapter.java
示例8: onDateSet
import com.android.datetimepicker.date.DatePickerDialog; //导入依赖的package包/类
@Override
public void onDateSet(DatePickerDialog dialog, int year, int monthOfYear, int dayOfMonth) {
//This is the call back from picker used in the sample you can use custom or any other picker
//IMPORTANT: get the year,month and date from picker you using and call setDateWeek method
Calendar calendar = Calendar.getInstance();
calendar.set(year, monthOfYear, dayOfMonth);
rCalendarFragment.setDateWeek(calendar);//Sets the selected date from Picker
}
开发者ID:rameshvoltella,项目名称:RWeekCalendar,代码行数:14,代码来源:Sample.java
注:本文中的com.android.datetimepicker.date.DatePickerDialog类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论