Search in sources :

Example 11 with Button

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();
        }
    });
}
Also used : Button(android.widget.Button) HmsPickerBuilder(com.codetroopers.betterpickers.hmspicker.HmsPickerBuilder) TextView(android.widget.TextView) View(android.view.View)

Example 12 with Button

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);
        }
    });
}
Also used : CalendarDatePickerDialogFragment(com.codetroopers.betterpickers.calendardatepicker.CalendarDatePickerDialogFragment) Button(android.widget.Button) TextView(android.widget.TextView) View(android.view.View)

Example 13 with Button

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);
        }
    });
}
Also used : CalendarDatePickerDialogFragment(com.codetroopers.betterpickers.calendardatepicker.CalendarDatePickerDialogFragment) Button(android.widget.Button) TextView(android.widget.TextView) View(android.view.View)

Example 14 with Button

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();
        }
    });
}
Also used : Button(android.widget.Button) DatePickerBuilder(com.codetroopers.betterpickers.datepicker.DatePickerBuilder) TextView(android.widget.TextView) View(android.view.View)

Example 15 with Button

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);
        }
    });
}
Also used : CalendarDatePickerDialogFragment(com.codetroopers.betterpickers.calendardatepicker.CalendarDatePickerDialogFragment) Button(android.widget.Button) TextView(android.widget.TextView) View(android.view.View)

Aggregations

Button (android.widget.Button)1427 View (android.view.View)872 TextView (android.widget.TextView)585 OnClickListener (android.view.View.OnClickListener)272 Intent (android.content.Intent)189 LinearLayout (android.widget.LinearLayout)186 ImageView (android.widget.ImageView)141 EditText (android.widget.EditText)120 ListView (android.widget.ListView)112 AdapterView (android.widget.AdapterView)74 ViewGroup (android.view.ViewGroup)62 ScrollView (android.widget.ScrollView)51 Test (org.junit.Test)51 CompoundButton (android.widget.CompoundButton)49 FrameLayout (android.widget.FrameLayout)47 Bundle (android.os.Bundle)44 CheckBox (android.widget.CheckBox)43 ImageButton (android.widget.ImageButton)43 LargeTest (android.test.suitebuilder.annotation.LargeTest)41 DialogInterface (android.content.DialogInterface)39