use of android.widget.Button in project android-betterpickers by code-troopers.
the class SampleHmsThemeCustom 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.hms_picker_set);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
HmsPickerBuilder hpb = new HmsPickerBuilder().setFragmentManager(getSupportFragmentManager()).setStyleResId(R.style.MyCustomBetterPickerTheme);
hpb.show();
}
});
}
use of android.widget.Button 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);
}
});
}
use of android.widget.Button 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);
}
});
}
use of android.widget.Button in project android-betterpickers by code-troopers.
the class SampleDateDismissListener 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.date_picker_set);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
DatePickerBuilder dpb = new DatePickerBuilder().setFragmentManager(getSupportFragmentManager()).setStyleResId(R.style.BetterPickersDialogFragment).setOnDismissListener(SampleDateDismissListener.this);
dpb.show();
}
});
}
use of android.widget.Button 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);
}
});
}
Aggregations