Search in sources :

Example 1 with CalendarDatePickerDialogFragment

use of com.codetroopers.betterpickers.calendardatepicker.CalendarDatePickerDialogFragment in project android-betterpickers by code-troopers.

the class SampleCalendarDateRangeMin 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);
    }
}
Also used : CalendarDatePickerDialogFragment(com.codetroopers.betterpickers.calendardatepicker.CalendarDatePickerDialogFragment)

Example 2 with CalendarDatePickerDialogFragment

use of com.codetroopers.betterpickers.calendardatepicker.CalendarDatePickerDialogFragment in project android-betterpickers by code-troopers.

the class SampleCalendarDateThemeCustom 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().setDoneText(getString(R.string.button_label_custom_ok)).setCancelText(getString(R.string.button_label_custom_cancel)).setThemeCustom(R.style.MyCustomBetterPickersDialogs).setOnDateSetListener(SampleCalendarDateThemeCustom.this);
            cdp.show(getSupportFragmentManager(), FRAG_TAG_DATE_PICKER);
        }
    });
}
Also used : CalendarDatePickerDialogFragment(com.codetroopers.betterpickers.calendardatepicker.CalendarDatePickerDialogFragment) Button(android.widget.Button) TextView(android.widget.TextView) View(android.view.View)

Example 3 with CalendarDatePickerDialogFragment

use of com.codetroopers.betterpickers.calendardatepicker.CalendarDatePickerDialogFragment in project android-betterpickers by code-troopers.

the class SampleCalendarDateThemeLight 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().setThemeLight().setOnDateSetListener(SampleCalendarDateThemeLight.this);
            cdp.show(getSupportFragmentManager(), FRAG_TAG_DATE_PICKER);
        }
    });
}
Also used : CalendarDatePickerDialogFragment(com.codetroopers.betterpickers.calendardatepicker.CalendarDatePickerDialogFragment) Button(android.widget.Button) TextView(android.widget.TextView) View(android.view.View)

Example 4 with CalendarDatePickerDialogFragment

use of com.codetroopers.betterpickers.calendardatepicker.CalendarDatePickerDialogFragment in project android-betterpickers by code-troopers.

the class SampleCalendarDateThemeLight 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);
    }
}
Also used : CalendarDatePickerDialogFragment(com.codetroopers.betterpickers.calendardatepicker.CalendarDatePickerDialogFragment)

Example 5 with CalendarDatePickerDialogFragment

use of com.codetroopers.betterpickers.calendardatepicker.CalendarDatePickerDialogFragment in project android-betterpickers by code-troopers.

the class SampleCalendarDateBasicUsage method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.text_and_button_colored);
    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().setOnDateSetListener(SampleCalendarDateBasicUsage.this);
            cdp.show(getSupportFragmentManager(), FRAG_TAG_DATE_PICKER);
        }
    });
}
Also used : CalendarDatePickerDialogFragment(com.codetroopers.betterpickers.calendardatepicker.CalendarDatePickerDialogFragment) Button(android.widget.Button) TextView(android.widget.TextView) View(android.view.View)

Aggregations

CalendarDatePickerDialogFragment (com.codetroopers.betterpickers.calendardatepicker.CalendarDatePickerDialogFragment)26 View (android.view.View)14 TextView (android.widget.TextView)13 Button (android.widget.Button)11 MonthAdapter (com.codetroopers.betterpickers.calendardatepicker.MonthAdapter)5 DateTime (org.joda.time.DateTime)5 RadialTimePickerDialogFragment (com.codetroopers.betterpickers.radialtimepicker.RadialTimePickerDialogFragment)3 Calendar (java.util.Calendar)3 AdapterView (android.widget.AdapterView)2 Time (ve.com.abicelis.remindy.model.Time)2 DialogInterface (android.content.DialogInterface)1 Nullable (android.support.annotation.Nullable)1 Editable (android.text.Editable)1 TextWatcher (android.text.TextWatcher)1 SparseArray (android.util.SparseArray)1 OnDialogDismissListener (com.codetroopers.betterpickers.OnDialogDismissListener)1 NumberPickerBuilder (com.codetroopers.betterpickers.numberpicker.NumberPickerBuilder)1 BigDecimal (java.math.BigDecimal)1