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


Java DatePickerDialog.vibrate方法代码示例

本文整理汇总了Java中com.wdullaer.materialdatetimepicker.date.DatePickerDialog.vibrate方法的典型用法代码示例。如果您正苦于以下问题:Java DatePickerDialog.vibrate方法的具体用法?Java DatePickerDialog.vibrate怎么用?Java DatePickerDialog.vibrate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.wdullaer.materialdatetimepicker.date.DatePickerDialog的用法示例。


在下文中一共展示了DatePickerDialog.vibrate方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: showDatePickerDialog

import com.wdullaer.materialdatetimepicker.date.DatePickerDialog; //导入方法依赖的package包/类
public void showDatePickerDialog() {
    Calendar c = Calendar.getInstance();
    c.set(mYear, mMonth, mDay);
    DatePickerDialog dialog = DatePickerDialog.newInstance((datePickerDialog, year, monthOfYear, dayOfMonth) -> {
        mYear = year;
        mMonth = monthOfYear;
        mDay = dayOfMonth;
        c.set(mYear, monthOfYear, mDay);

        mPresenter.loadNews(true, true, c.getTimeInMillis());

    }, c.get(Calendar.YEAR), c.get(Calendar.MONTH), c.get(Calendar.DAY_OF_MONTH));

    dialog.setMaxDate(Calendar.getInstance());

    Calendar minDate = Calendar.getInstance();
    minDate.set(2013, 5, 20);
    dialog.setMinDate(minDate);
    dialog.vibrate(false);

    dialog.show(getActivity().getFragmentManager(), ZhihuDailyFragment.class.getSimpleName());

}
 
开发者ID:SpeedPromise,项目名称:L-Assistant,代码行数:24,代码来源:ZhihuDailyFragment.java

示例2: showDatePickerDialog

import com.wdullaer.materialdatetimepicker.date.DatePickerDialog; //导入方法依赖的package包/类
public void showDatePickerDialog() {
    DatePickerDialog dialog = DatePickerDialog.newInstance((datePickerDialog, year, monthOfYear, dayOfMonth) -> {
        mYear = year;
        mMonth = monthOfYear;
        mDay = dayOfMonth;
        Calendar c = Calendar.getInstance();
        c.set(mYear, mMonth, mDay);
        mPresenter.load(true, true, c.getTimeInMillis());

    }, mYear, mMonth, mDay);

    dialog.setMaxDate(Calendar.getInstance());

    Calendar minDate = Calendar.getInstance();
    minDate.set(2014, 5, 12);
    dialog.setMinDate(minDate);

    dialog.vibrate(false);
    dialog.show(getActivity().getFragmentManager(), DoubanMomentFragment.class.getSimpleName());

}
 
开发者ID:SpeedPromise,项目名称:L-Assistant,代码行数:22,代码来源:DoubanMomentFragment.java

示例3: showPickDialog

import com.wdullaer.materialdatetimepicker.date.DatePickerDialog; //导入方法依赖的package包/类
public void showPickDialog() {

        Calendar now = Calendar.getInstance();
        now.set(mYear, mMonth, mDay);
        DatePickerDialog dialog = DatePickerDialog.newInstance(new DatePickerDialog.OnDateSetListener() {
            @Override
            public void onDateSet(DatePickerDialog view, int year, int monthOfYear, int dayOfMonth) {
                Calendar temp = Calendar.getInstance();
                temp.clear();
                temp.set(year, monthOfYear, dayOfMonth);
                mYear = year;
                mMonth = monthOfYear;
                mDay = dayOfMonth;
                presenter.loadPosts(temp.getTimeInMillis(), true);
            }
        }, now.get(Calendar.YEAR), now.get(Calendar.MONTH), now.get(Calendar.DAY_OF_MONTH));

        dialog.setMaxDate(Calendar.getInstance());
        Calendar minDate = Calendar.getInstance();
        minDate.set(2014, 5, 12);
        dialog.setMinDate(minDate);
        // set the dialog not vibrate when date change, default value is true
        dialog.vibrate(false);

        dialog.show(getActivity().getFragmentManager(), "DatePickerDialog");

    }
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:28,代码来源:DoubanMomentFragment.java

示例4: 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");
}
 
开发者ID:iskandergaba,项目名称:Botanist,代码行数:30,代码来源:NewPlantDetailsFragment.java

示例5: openDatePicker

import com.wdullaer.materialdatetimepicker.date.DatePickerDialog; //导入方法依赖的package包/类
private void openDatePicker() {
        Calendar c = Calendar.getInstance();
        long time = mRemindItem.getTime();
        if (time > 0) {
            c.setTimeInMillis(time);
        }
        int year = c.get(Calendar.YEAR);
        int month = c.get(Calendar.MONTH);
        int day = c.get(Calendar.DAY_OF_MONTH);

        DatePickerDialog datePickerDialog = DatePickerDialog.newInstance(mDateSetListener, year, month, day);
//        datePickerDialog.dismissOnPause(true);
        datePickerDialog.vibrate(false);
        datePickerDialog.show(getActivity().getFragmentManager(), DATE_PICKER_DIALOG_TAG);
    }
 
开发者ID:trigor74,项目名称:travelers-diary,代码行数:16,代码来源:ReminderItemFragment.java

示例6: showPickDialog

import com.wdullaer.materialdatetimepicker.date.DatePickerDialog; //导入方法依赖的package包/类
public void showPickDialog() {
  Calendar now = Calendar.getInstance();
  now.set(mYear, mMonth, mDay);
  DatePickerDialog dialog =
      DatePickerDialog.newInstance(new DatePickerDialog.OnDateSetListener() {
        @Override
        public void onDateSet(DatePickerDialog view, int year, int monthOfYear, int dayOfMonth) {
          mYear = year;
          mMonth = monthOfYear;
          mDay = dayOfMonth;
          Calendar temp = Calendar.getInstance();
          temp.clear();
          temp.set(year, monthOfYear, dayOfMonth);
          tvSelectTime.setText(year + "-" + (monthOfYear + 1) + "-" + dayOfMonth);
          timeValue = year + "-" + (monthOfYear + 1) + "-" + dayOfMonth;
          //presenter.loadPosts(temp.getTimeInMillis(), true);
        }
      }, now.get(Calendar.YEAR), now.get(Calendar.MONTH), now.get(Calendar.DAY_OF_MONTH));

  dialog.setMaxDate(Calendar.getInstance());
  Calendar minDate = Calendar.getInstance();
  //
  minDate.set(2014, 12, 31);
  dialog.setMinDate(minDate);
  dialog.vibrate(false);
  dialog.show(this.getFragmentManager(), "DatePickerDialog");
}
 
开发者ID:binarylife,项目名称:Ydkd,代码行数:28,代码来源:SearchTagWorkFixOrderActivity.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.vibrate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。