Search in sources :

Example 16 with TextView

use of android.widget.TextView 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 17 with TextView

use of android.widget.TextView 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 18 with TextView

use of android.widget.TextView 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 19 with TextView

use of android.widget.TextView 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 20 with TextView

use of android.widget.TextView 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

TextView (android.widget.TextView)4784 View (android.view.View)2545 ImageView (android.widget.ImageView)1082 Button (android.widget.Button)423 LinearLayout (android.widget.LinearLayout)417 LayoutInflater (android.view.LayoutInflater)401 ListView (android.widget.ListView)375 Intent (android.content.Intent)367 AdapterView (android.widget.AdapterView)356 ViewGroup (android.view.ViewGroup)314 OnClickListener (android.view.View.OnClickListener)291 Test (org.junit.Test)197 RecyclerView (android.support.v7.widget.RecyclerView)177 ScrollView (android.widget.ScrollView)157 Drawable (android.graphics.drawable.Drawable)152 DialogInterface (android.content.DialogInterface)145 Context (android.content.Context)144 EditText (android.widget.EditText)138 Bundle (android.os.Bundle)133 AlertDialog (android.app.AlertDialog)127