Search in sources :

Example 6 with GamedayTickerClickListener

use of com.thebluealliance.androidclient.listeners.GamedayTickerClickListener in project the-blue-alliance-android by the-blue-alliance.

the class GenericNotificationItemView method bind.

@Override
public void bind(GenericNotificationViewModel model) {
    header.setText(model.getHeader());
    title.setText(model.getTitle());
    message.setText(model.getSummary());
    time.setText(model.getTimeString());
    summaryContainer.setOnClickListener(new GamedayTickerClickListener(getContext(), model.getIntent()));
}
Also used : GamedayTickerClickListener(com.thebluealliance.androidclient.listeners.GamedayTickerClickListener)

Example 7 with GamedayTickerClickListener

use of com.thebluealliance.androidclient.listeners.GamedayTickerClickListener in project the-blue-alliance-android by the-blue-alliance.

the class ScheduleUpdatedNotification method getView.

@Override
public View getView(Context c, LayoutInflater inflater, View convertView) {
    ViewHolder holder;
    if (convertView == null || !(convertView.getTag() instanceof ViewHolder)) {
        convertView = inflater.inflate(R.layout.list_item_notification_schedule_updated, null, false);
        holder = new ViewHolder();
        holder.header = (TextView) convertView.findViewById(R.id.card_header);
        holder.details = (TextView) convertView.findViewById(R.id.details);
        holder.time = (TextView) convertView.findViewById(R.id.notification_time);
        holder.summaryContainer = (LinearLayout) convertView.findViewById(R.id.summary_container);
        convertView.setTag(holder);
    } else {
        holder = (ViewHolder) convertView.getTag();
    }
    holder.header.setText(c.getString(R.string.gameday_ticker_event_title_format, EventHelper.shortName(eventName), EventHelper.getShortCodeForEventKey(eventKey).toUpperCase()));
    holder.details.setText(getNotificationBodyString(c));
    holder.time.setText(getNotificationTimeString(c));
    holder.summaryContainer.setOnClickListener(new GamedayTickerClickListener(c, this));
    return convertView;
}
Also used : GamedayTickerClickListener(com.thebluealliance.androidclient.listeners.GamedayTickerClickListener)

Example 8 with GamedayTickerClickListener

use of com.thebluealliance.androidclient.listeners.GamedayTickerClickListener in project the-blue-alliance-android by the-blue-alliance.

the class ScoreNotification method getView.

@Override
public View getView(Context c, LayoutInflater inflater, View convertView) {
    ViewHolder holder;
    if (convertView == null || !(convertView.getTag() instanceof ViewHolder)) {
        convertView = inflater.inflate(R.layout.list_item_notification_score, null, false);
        holder = new ViewHolder();
        holder.header = (TextView) convertView.findViewById(R.id.card_header);
        holder.title = (TextView) convertView.findViewById(R.id.title);
        holder.matchView = (MatchView) convertView.findViewById(R.id.match_details);
        holder.time = (TextView) convertView.findViewById(R.id.notification_time);
        holder.summaryContainer = convertView.findViewById(R.id.summary_container);
        convertView.setTag(holder);
    } else {
        holder = (ViewHolder) convertView.getTag();
    }
    holder.header.setText(c.getString(R.string.gameday_ticker_event_title_format, EventHelper.shortName(eventName), EventHelper.getShortCodeForEventKey(eventKey).toUpperCase()));
    holder.title.setText(c.getString(R.string.notification_score_gameday_title, MatchHelper.getMatchTitleFromMatchKey(c, matchKey)));
    holder.time.setText(getNotificationTimeString(c));
    holder.summaryContainer.setOnClickListener(new GamedayTickerClickListener(c, this));
    MatchListElement renderedMatch = mRenderer.renderFromModel(match, MatchRenderer.RENDER_NOTIFICATION);
    if (renderedMatch != null) {
        renderedMatch.getView(c, inflater, holder.matchView);
    }
    return convertView;
}
Also used : GamedayTickerClickListener(com.thebluealliance.androidclient.listeners.GamedayTickerClickListener) MatchListElement(com.thebluealliance.androidclient.listitems.MatchListElement)

Example 9 with GamedayTickerClickListener

use of com.thebluealliance.androidclient.listeners.GamedayTickerClickListener in project the-blue-alliance-android by the-blue-alliance.

the class ScheduleUpdatedNotificationItemView method bind.

@Override
public void bind(ScheduleUpdatedNotificationViewModel model) {
    header.setText(model.getTitle());
    details.setText(model.getDetails());
    time.setText(model.getTimeString());
    summaryContainer.setOnClickListener(new GamedayTickerClickListener(getContext(), model.getIntent()));
}
Also used : GamedayTickerClickListener(com.thebluealliance.androidclient.listeners.GamedayTickerClickListener)

Example 10 with GamedayTickerClickListener

use of com.thebluealliance.androidclient.listeners.GamedayTickerClickListener in project the-blue-alliance-android by the-blue-alliance.

the class UpcomingMatchNotificationItemView method bind.

@Override
public void bind(UpcomingMatchNotificationViewModel model) {
    header.setText(model.getHeader());
    title.setText(model.getTitle());
    time.setText(model.getNotificationTime());
    summaryContainer.setOnClickListener(new GamedayTickerClickListener(getContext(), model.getIntent()));
    new MatchListElement(model.getRedTeams(), model.getBlueTeams(), model.getMatchKey(), model.getMatchTime(), null).getView(getContext(), LayoutInflater.from(getContext()), matchView);
}
Also used : GamedayTickerClickListener(com.thebluealliance.androidclient.listeners.GamedayTickerClickListener) MatchListElement(com.thebluealliance.androidclient.listitems.MatchListElement)

Aggregations

GamedayTickerClickListener (com.thebluealliance.androidclient.listeners.GamedayTickerClickListener)13 MatchListElement (com.thebluealliance.androidclient.listitems.MatchListElement)4