当前位置: 首页>>代码示例>>Java>>正文


Java DatePickerDialog.setThemeDark方法代码示例

本文整理汇总了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");
}
 
开发者ID:Tiraza,项目名称:easy-finance,代码行数:20,代码来源:DespesaFormFragment.java

示例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");
}
 
开发者ID:Tiraza,项目名称:easy-finance,代码行数:20,代码来源:ReceitaFormFragment.java

示例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);
}
 
开发者ID:stfalcon-studio,项目名称:patrol-android,代码行数:13,代码来源:UploadVideoActivity.java

示例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");
}
 
开发者ID:bkromhout,项目名称:Ruqus,代码行数:12,代码来源:DateInputView.java

示例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;
    }
}
 
开发者ID:MilosKozak,项目名称:AndroidAPS,代码行数:37,代码来源:NewNSTreatmentDialog.java

示例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");
}
 
开发者ID:Tiraza,项目名称:easy-finance,代码行数:15,代码来源:PanelChartBalance.java

示例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");
}
 
开发者ID:kuastw,项目名称:KUAS-AP-Material,代码行数:11,代码来源:BusActivity.java


注:本文中的com.wdullaer.materialdatetimepicker.date.DatePickerDialog.setThemeDark方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。