Search in sources :

Example 1 with ExpirationPickerBuilder

use of com.codetroopers.betterpickers.expirationpicker.ExpirationPickerBuilder in project android-betterpickers by code-troopers.

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

        @Override
        public void onClick(View v) {
            ExpirationPickerBuilder epb = new ExpirationPickerBuilder().setFragmentManager(getSupportFragmentManager()).setStyleResId(R.style.BetterPickersDialogFragment).setOnDismissListener(SampleExpirationDismissListener.this);
            epb.show();
        }
    });
}
Also used : Button(android.widget.Button) TextView(android.widget.TextView) View(android.view.View) ExpirationPickerBuilder(com.codetroopers.betterpickers.expirationpicker.ExpirationPickerBuilder)

Example 2 with ExpirationPickerBuilder

use of com.codetroopers.betterpickers.expirationpicker.ExpirationPickerBuilder in project android-betterpickers by code-troopers.

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

        @Override
        public void onClick(View v) {
            ExpirationPickerBuilder epb = new ExpirationPickerBuilder().setFragmentManager(getSupportFragmentManager()).setStyleResId(R.style.BetterPickersDialogFragment).setMinYear(2000);
            epb.show();
        }
    });
}
Also used : Button(android.widget.Button) TextView(android.widget.TextView) View(android.view.View) ExpirationPickerBuilder(com.codetroopers.betterpickers.expirationpicker.ExpirationPickerBuilder)

Example 3 with ExpirationPickerBuilder

use of com.codetroopers.betterpickers.expirationpicker.ExpirationPickerBuilder in project android-betterpickers by code-troopers.

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

        @Override
        public void onClick(View v) {
            ExpirationPickerBuilder epb = new ExpirationPickerBuilder().setFragmentManager(getSupportFragmentManager()).setStyleResId(R.style.BetterPickersDialogFragment);
            epb.show();
        }
    });
}
Also used : Button(android.widget.Button) TextView(android.widget.TextView) View(android.view.View) ExpirationPickerBuilder(com.codetroopers.betterpickers.expirationpicker.ExpirationPickerBuilder)

Aggregations

View (android.view.View)3 Button (android.widget.Button)3 TextView (android.widget.TextView)3 ExpirationPickerBuilder (com.codetroopers.betterpickers.expirationpicker.ExpirationPickerBuilder)3