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);
}
});
}
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);
}
});
}
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));
}
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);
}
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));
}
Aggregations