Search in sources :

Example 21 with TextView

use of android.widget.TextView in project android-betterpickers by code-troopers.

the class SampleCalendarDateFirstDayOfWeek 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().setOnDateSetListener(SampleCalendarDateFirstDayOfWeek.this).setFirstDayOfWeek(Calendar.SUNDAY);
            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 22 with TextView

use of android.widget.TextView in project android-betterpickers by code-troopers.

the class SampleCalendarDatePreselectedDate 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) {
            DateTime towDaysAgo = DateTime.now().minusDays(2);
            CalendarDatePickerDialogFragment cdp = new CalendarDatePickerDialogFragment().setOnDateSetListener(SampleCalendarDatePreselectedDate.this).setPreselectedDate(towDaysAgo.getYear(), towDaysAgo.getMonthOfYear() - 1, towDaysAgo.getDayOfMonth());
            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) DateTime(org.joda.time.DateTime)

Example 23 with TextView

use of android.widget.TextView in project cw-omnibus by commonsguy.

the class LegalNoticesActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.legal);
    TextView legal = (TextView) findViewById(R.id.legal);
    legal.setText(GoogleApiAvailability.getInstance().getOpenSourceSoftwareLicenseInfo(this));
}
Also used : TextView(android.widget.TextView)

Example 24 with TextView

use of android.widget.TextView in project cw-omnibus by commonsguy.

the class PopupAdapter method getInfoContents.

@SuppressLint("InflateParams")
@Override
public View getInfoContents(Marker marker) {
    if (popup == null) {
        popup = inflater.inflate(R.layout.popup, null);
    }
    if (lastMarker == null || !lastMarker.getId().equals(marker.getId())) {
        lastMarker = marker;
        TextView tv = (TextView) popup.findViewById(R.id.title);
        tv.setText(marker.getTitle());
        tv = (TextView) popup.findViewById(R.id.snippet);
        tv.setText(marker.getSnippet());
        Uri image = images.get(marker.getId());
        ImageView icon = (ImageView) popup.findViewById(R.id.icon);
        if (image == null) {
            icon.setVisibility(View.GONE);
        } else {
            Picasso.with(ctxt).load(image).resize(iconWidth, iconHeight).centerCrop().noFade().placeholder(R.drawable.placeholder).into(icon, new MarkerCallback(marker));
        }
    }
    return (popup);
}
Also used : TextView(android.widget.TextView) ImageView(android.widget.ImageView) Uri(android.net.Uri) SuppressLint(android.annotation.SuppressLint)

Example 25 with TextView

use of android.widget.TextView in project cw-omnibus by commonsguy.

the class LegalNoticesActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.legal);
    TextView legal = (TextView) findViewById(R.id.legal);
    legal.setText(GoogleApiAvailability.getInstance().getOpenSourceSoftwareLicenseInfo(this));
}
Also used : TextView(android.widget.TextView)

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