use of com.codetroopers.betterpickers.datepicker.DatePickerBuilder in project android-betterpickers by code-troopers.
the class SampleDateThemeCustom 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.MyCustomBetterPickerTheme);
dpb.show();
}
});
}
use of com.codetroopers.betterpickers.datepicker.DatePickerBuilder in project android-betterpickers by code-troopers.
the class SampleDateThemeLight 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_Light);
dpb.show();
}
});
}
use of com.codetroopers.betterpickers.datepicker.DatePickerBuilder in project android-betterpickers by code-troopers.
the class SampleDateYearOptional 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).setYearOptional(true);
dpb.show();
}
});
}
use of com.codetroopers.betterpickers.datepicker.DatePickerBuilder 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 com.codetroopers.betterpickers.datepicker.DatePickerBuilder in project android-betterpickers by code-troopers.
the class SampleDateBasicUsage 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);
dpb.show();
}
});
}
Aggregations