use of com.alexstyl.specialdates.addevent.ui.ContactSuggestionView in project Memento-Calendar by alexstyl.
the class ContactDetailsAdapter method onCreateViewHolder.
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
if (viewType == TYPE_CONTACT_SUGGESTION) {
LayoutInflater layoutInflater = LayoutInflater.from(parent.getContext());
View view = layoutInflater.inflate(R.layout.row_add_event_contact_suggestion, parent, false);
ContactSuggestionView suggestionView = Views.findById(view, R.id.add_event_contact_autocomplete);
return new ContactSuggestionViewHolder(suggestionView);
} else if (viewType == TYPE_EVENT) {
LayoutInflater layoutInflater = LayoutInflater.from(parent.getContext());
View view = layoutInflater.inflate(R.layout.row_add_event_contact_event, parent, false);
ImageView icon = Views.findById(view, R.id.add_event_event_icon);
TextView datePicker = Views.findById(view, R.id.add_event_date_picker);
ImageButton clear = Views.findById(view, R.id.add_event_remove_event);
return new ContactEventViewHolder(view, icon, datePicker, clear);
} else {
throw new IllegalStateException("Received viewType " + viewType);
}
}
use of com.alexstyl.specialdates.addevent.ui.ContactSuggestionView in project Memento-Calendar by alexstyl.
the class ContactEventsAdapter method onCreateViewHolder.
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
if (viewType == TYPE_CONTACT_SUGGESTION) {
LayoutInflater layoutInflater = LayoutInflater.from(parent.getContext());
View view = layoutInflater.inflate(R.layout.row_add_event_contact_suggestion, parent, false);
ContactSuggestionView suggestionView = Views.findById(view, R.id.add_event_contact_autocomplete);
return new ContactSuggestionViewHolder(suggestionView);
} else if (viewType == TYPE_EVENT) {
LayoutInflater layoutInflater = LayoutInflater.from(parent.getContext());
View view = layoutInflater.inflate(R.layout.row_add_event_contact_event, parent, false);
ImageView icon = Views.findById(view, R.id.add_event_event_icon);
TextView datePicker = Views.findById(view, R.id.add_event_date_picker);
ImageButton clear = Views.findById(view, R.id.add_event_remove_event);
return new ContactEventViewHolder(view, icon, datePicker, clear);
} else {
throw new IllegalStateException("Received viewType " + viewType);
}
}
Aggregations