use of com.codetroopers.betterpickers.calendardatepicker.CalendarDatePickerDialogFragment in project android-betterpickers by code-troopers.
the class SampleCalendarDateRangeMax method onResume.
@Override
public void onResume() {
// Example of reattaching to the fragment
super.onResume();
CalendarDatePickerDialogFragment calendarDatePickerDialogFragment = (CalendarDatePickerDialogFragment) getSupportFragmentManager().findFragmentByTag(FRAG_TAG_DATE_PICKER);
if (calendarDatePickerDialogFragment != null) {
calendarDatePickerDialogFragment.setOnDateSetListener(this);
}
}
use of com.codetroopers.betterpickers.calendardatepicker.CalendarDatePickerDialogFragment in project android-betterpickers by code-troopers.
the class SampleCalendarDateRangeMin method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.text_and_button);
mResultTextView = (TextView) findViewById(R.id.text);
Button button = (Button) findViewById(R.id.button);
mResultTextView.setText(R.string.no_value);
button.setText(R.string.calendar_date_picker_set);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
DateTime now = DateTime.now();
MonthAdapter.CalendarDay minDate = new MonthAdapter.CalendarDay(now.getYear(), now.getMonthOfYear() - 2, now.getDayOfMonth());
CalendarDatePickerDialogFragment cdp = new CalendarDatePickerDialogFragment().setDateRange(minDate, null).setOnDateSetListener(SampleCalendarDateRangeMin.this);
cdp.show(getSupportFragmentManager(), FRAG_TAG_DATE_PICKER);
}
});
}
use of com.codetroopers.betterpickers.calendardatepicker.CalendarDatePickerDialogFragment in project android-betterpickers by code-troopers.
the class SampleCalendarDateThemeCustom method onResume.
@Override
public void onResume() {
// Example of reattaching to the fragment
super.onResume();
CalendarDatePickerDialogFragment calendarDatePickerDialogFragment = (CalendarDatePickerDialogFragment) getSupportFragmentManager().findFragmentByTag(FRAG_TAG_DATE_PICKER);
if (calendarDatePickerDialogFragment != null) {
calendarDatePickerDialogFragment.setOnDateSetListener(this);
}
}
use of com.codetroopers.betterpickers.calendardatepicker.CalendarDatePickerDialogFragment in project android-betterpickers by code-troopers.
the class SampleCalendarDateThemeDark method onResume.
@Override
public void onResume() {
// Example of reattaching to the fragment
super.onResume();
CalendarDatePickerDialogFragment calendarDatePickerDialogFragment = (CalendarDatePickerDialogFragment) getSupportFragmentManager().findFragmentByTag(FRAG_TAG_DATE_PICKER);
if (calendarDatePickerDialogFragment != null) {
calendarDatePickerDialogFragment.setOnDateSetListener(this);
}
}
use of com.codetroopers.betterpickers.calendardatepicker.CalendarDatePickerDialogFragment in project android-betterpickers by code-troopers.
the class SampleCalendarDateThemeDark method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.text_and_button);
mResultTextView = (TextView) findViewById(R.id.text);
Button button = (Button) findViewById(R.id.button);
mResultTextView.setText(R.string.no_value);
button.setText(R.string.calendar_date_picker_set);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
CalendarDatePickerDialogFragment cdp = new CalendarDatePickerDialogFragment().setThemeDark().setOnDateSetListener(SampleCalendarDateThemeDark.this);
cdp.show(getSupportFragmentManager(), FRAG_TAG_DATE_PICKER);
}
});
}
Aggregations