Search in sources :

Example 6 with RadialTimePickerDialogFragment

use of com.codetroopers.betterpickers.radialtimepicker.RadialTimePickerDialogFragment in project android-betterpickers by code-troopers.

the class SampleRadialTimeMinMax 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.radial_time_picker);
    button.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            RadialTimePickerDialogFragment rtpd = new RadialTimePickerDialogFragment().setOnTimeSetListener(SampleRadialTimeMinMax.this).setFutureMinutesLimit(60).setPastMinutesLimit(60).setValidateDateTime(Calendar.getInstance()).setPickerDate(Calendar.getInstance()).setForced12hFormat();
            rtpd.show(getSupportFragmentManager(), FRAG_TAG_TIME_PICKER);
        }
    });
}
Also used : Button(android.widget.Button) RadialTimePickerDialogFragment(com.codetroopers.betterpickers.radialtimepicker.RadialTimePickerDialogFragment) TextView(android.widget.TextView) View(android.view.View)

Example 7 with RadialTimePickerDialogFragment

use of com.codetroopers.betterpickers.radialtimepicker.RadialTimePickerDialogFragment in project android-betterpickers by code-troopers.

the class SampleRadialTimeStartTime method onResume.

@Override
public void onResume() {
    // Example of reattaching to the fragment
    super.onResume();
    RadialTimePickerDialogFragment rtpd = (RadialTimePickerDialogFragment) getSupportFragmentManager().findFragmentByTag(FRAG_TAG_TIME_PICKER);
    if (rtpd != null) {
        rtpd.setOnTimeSetListener(this);
    }
}
Also used : RadialTimePickerDialogFragment(com.codetroopers.betterpickers.radialtimepicker.RadialTimePickerDialogFragment)

Example 8 with RadialTimePickerDialogFragment

use of com.codetroopers.betterpickers.radialtimepicker.RadialTimePickerDialogFragment in project android-betterpickers by code-troopers.

the class SampleRadialTimeStartTime 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.radial_time_picker);
    button.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            RadialTimePickerDialogFragment rtpd = new RadialTimePickerDialogFragment().setOnTimeSetListener(SampleRadialTimeStartTime.this).setStartTime(10, 10);
            rtpd.show(getSupportFragmentManager(), FRAG_TAG_TIME_PICKER);
        }
    });
}
Also used : Button(android.widget.Button) RadialTimePickerDialogFragment(com.codetroopers.betterpickers.radialtimepicker.RadialTimePickerDialogFragment) TextView(android.widget.TextView) View(android.view.View)

Example 9 with RadialTimePickerDialogFragment

use of com.codetroopers.betterpickers.radialtimepicker.RadialTimePickerDialogFragment in project android-betterpickers by code-troopers.

the class SampleRadialTimeThemeDark 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.radial_time_picker);
    button.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            RadialTimePickerDialogFragment rtpd = new RadialTimePickerDialogFragment().setOnTimeSetListener(SampleRadialTimeThemeDark.this).setThemeDark();
            rtpd.show(getSupportFragmentManager(), FRAG_TAG_TIME_PICKER);
        }
    });
}
Also used : Button(android.widget.Button) RadialTimePickerDialogFragment(com.codetroopers.betterpickers.radialtimepicker.RadialTimePickerDialogFragment) TextView(android.widget.TextView) View(android.view.View)

Example 10 with RadialTimePickerDialogFragment

use of com.codetroopers.betterpickers.radialtimepicker.RadialTimePickerDialogFragment in project android-betterpickers by code-troopers.

the class SampleRadialTimeThemeLight 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.radial_time_picker);
    button.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            RadialTimePickerDialogFragment rtpd = new RadialTimePickerDialogFragment().setOnTimeSetListener(SampleRadialTimeThemeLight.this).setThemeLight();
            rtpd.show(getSupportFragmentManager(), FRAG_TAG_TIME_PICKER);
        }
    });
}
Also used : Button(android.widget.Button) RadialTimePickerDialogFragment(com.codetroopers.betterpickers.radialtimepicker.RadialTimePickerDialogFragment) TextView(android.widget.TextView) View(android.view.View)

Aggregations

RadialTimePickerDialogFragment (com.codetroopers.betterpickers.radialtimepicker.RadialTimePickerDialogFragment)21 View (android.view.View)12 TextView (android.widget.TextView)11 Button (android.widget.Button)9 CalendarDatePickerDialogFragment (com.codetroopers.betterpickers.calendardatepicker.CalendarDatePickerDialogFragment)3 AdapterView (android.widget.AdapterView)2 Calendar (java.util.Calendar)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 OnDialogDismissListener (com.codetroopers.betterpickers.OnDialogDismissListener)1 MonthAdapter (com.codetroopers.betterpickers.calendardatepicker.MonthAdapter)1 NumberPickerBuilder (com.codetroopers.betterpickers.numberpicker.NumberPickerBuilder)1 BigDecimal (java.math.BigDecimal)1