本文整理汇总了Java中com.wdullaer.materialdatetimepicker.date.DatePickerDialog.setThemeDark方法的典型用法代码示例。如果您正苦于以下问题:Java DatePickerDialog.setThemeDark方法的具体用法?Java DatePickerDialog.setThemeDark怎么用?Java DatePickerDialog.setThemeDark使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.wdullaer.materialdatetimepicker.date.DatePickerDialog
的用法示例。
在下文中一共展示了DatePickerDialog.setThemeDark方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onClickDataDespesa
import com.wdullaer.materialdatetimepicker.date.DatePickerDialog; //导入方法依赖的package包/类
@OnClick({R.id.edt_data_despesa, R.id.edt_data_vencimento_despesa})
public void onClickDataDespesa(View view) {
edtData = (EditText) view;
Calendar calendar = Calendar.getInstance();
if (view.getId() == R.id.edt_data_despesa) {
calendar.setTime(entity.getDataPaga());
} else {
calendar.setTime(entity.getDataVencimento());
}
int ano = calendar.get(Calendar.YEAR);
int mes = calendar.get(Calendar.MONTH);
int dia = calendar.get(Calendar.DAY_OF_MONTH);
DatePickerDialog dpd = DatePickerDialog.newInstance(this, ano, mes, dia);
dpd.setThemeDark(false);
dpd.show(getFragmentManager(), "Datepickerdialog");
}
示例2: onClickDataReceita
import com.wdullaer.materialdatetimepicker.date.DatePickerDialog; //导入方法依赖的package包/类
@OnClick({R.id.edt_data_vencimento_receita, R.id.edt_data_receita})
public void onClickDataReceita(View view) {
edtData = (EditText) view;
Calendar calendar = Calendar.getInstance();
if (view.getId() == R.id.edt_data_receita) {
calendar.setTime(entity.getDataPaga());
} else {
calendar.setTime(entity.getDataVencimento());
}
int ano = calendar.get(Calendar.YEAR);
int mes = calendar.get(Calendar.MONTH);
int dia = calendar.get(Calendar.DAY_OF_MONTH);
DatePickerDialog dpd = DatePickerDialog.newInstance(this, ano, mes, dia);
dpd.setThemeDark(false);
dpd.show(getFragmentManager(), "Datepickerdialog");
}
示例3: showDatePicker
import com.wdullaer.materialdatetimepicker.date.DatePickerDialog; //导入方法依赖的package包/类
public static void showDatePicker(Activity activity,
DatePickerDialog.OnDateSetListener setListener) {
Calendar now = Calendar.getInstance();
DatePickerDialog datePickerDialog = DatePickerDialog.newInstance(
setListener,
now.get(Calendar.YEAR),
now.get(Calendar.MONTH),
now.get(Calendar.DAY_OF_MONTH)
);
datePickerDialog.setThemeDark(true);
datePickerDialog.show(activity.getFragmentManager(), TAG_DATE_PICKER);
}
示例4: showDatePickerDialog
import com.wdullaer.materialdatetimepicker.date.DatePickerDialog; //导入方法依赖的package包/类
/**
* Show the date picker dialog to show for date inputs.
*/
private void showDatePickerDialog() {
Calendar c = Util.calFromString(tvDate.getText().toString());
DatePickerDialog dpd = DatePickerDialog.newInstance(this, c.get(Calendar.YEAR), c.get(Calendar.MONTH),
c.get(Calendar.DAY_OF_MONTH));
dpd.setThemeDark(theme == RuqusTheme.DARK);
dpd.autoDismiss(true);
dpd.show(((Activity) getContext()).getFragmentManager(), "RuqusDPD");
}
示例5: onClick
import com.wdullaer.materialdatetimepicker.date.DatePickerDialog; //导入方法依赖的package包/类
@Override
public void onClick(View view) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(eventTime);
switch (view.getId()) {
case R.id.careportal_newnstreatment_eventdate:
DatePickerDialog dpd = DatePickerDialog.newInstance(
this,
calendar.get(Calendar.YEAR),
calendar.get(Calendar.MONTH),
calendar.get(Calendar.DAY_OF_MONTH)
);
dpd.setThemeDark(true);
dpd.dismissOnPause(true);
dpd.show(context.getFragmentManager(), "Datepickerdialog");
break;
case R.id.careportal_newnstreatment_eventtime:
TimePickerDialog tpd = TimePickerDialog.newInstance(
this,
calendar.get(Calendar.HOUR_OF_DAY),
calendar.get(Calendar.MINUTE),
DateFormat.is24HourFormat(context)
);
tpd.setThemeDark(true);
tpd.dismissOnPause(true);
tpd.show(context.getFragmentManager(), "Timepickerdialog");
break;
case R.id.ok:
createNSTreatment();
dismiss();
break;
case R.id.cancel:
dismiss();
break;
}
}
示例6: onClick
import com.wdullaer.materialdatetimepicker.date.DatePickerDialog; //导入方法依赖的package包/类
@Override
public void onClick(View view) {
edtGenericDate = (EditText) view;
Calendar calendar = Calendar.getInstance();
calendar.setTime(new Date());
int ano = calendar.get(Calendar.YEAR);
int mes = calendar.get(Calendar.MONTH);
int dia = calendar.get(Calendar.DAY_OF_MONTH);
DatePickerDialog dpd = DatePickerDialog.newInstance(this, ano, mes, dia);
dpd.setThemeDark(false);
dpd.show(fragmentManager, "Datepickerdialog");
}
示例7: showDatePickerDialog
import com.wdullaer.materialdatetimepicker.date.DatePickerDialog; //导入方法依赖的package包/类
private void showDatePickerDialog() {
Calendar now = Calendar.getInstance();
DatePickerDialog dpd = DatePickerDialog
.newInstance(this, now.get(Calendar.YEAR), now.get(Calendar.MONTH),
now.get(Calendar.DAY_OF_MONTH));
dpd.setThemeDark(false);
dpd.vibrate(false);
dpd.dismissOnPause(false);
dpd.show(getFragmentManager(), "DatePickerDialog");
}