Search in sources :

Example 1 with GamedayTickerClickListener

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

the class GenericNotification 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_generic, null, false);
        holder = new ViewHolder();
        holder.header = (TextView) convertView.findViewById(R.id.card_header);
        holder.title = (TextView) convertView.findViewById(R.id.title);
        holder.message = (TextView) convertView.findViewById(R.id.message);
        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.notification_broadcast_header));
    holder.title.setText(title);
    holder.message.setText(message);
    holder.time.setText(getNotificationTimeString(c));
    holder.summaryContainer.setOnClickListener(new GamedayTickerClickListener(c, this));
    return convertView;
}
Also used : GamedayTickerClickListener(com.thebluealliance.androidclient.listeners.GamedayTickerClickListener)

Example 2 with GamedayTickerClickListener

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

the class UpcomingMatchNotification 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_upcoming_match, 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_upcoming_match_gameday_title, MatchHelper.getMatchTitleFromMatchKey(c, matchKey)));
    holder.time.setText(getNotificationTimeString(c));
    holder.summaryContainer.setOnClickListener(new GamedayTickerClickListener(c, this));
    new MatchListElement(redTeams, blueTeams, matchKey, JSONHelper.isNull(matchTime) ? -1 : matchTime.getAsLong(), null).getView(c, inflater, holder.matchView);
    return convertView;
}
Also used : GamedayTickerClickListener(com.thebluealliance.androidclient.listeners.GamedayTickerClickListener) MatchListElement(com.thebluealliance.androidclient.listitems.MatchListElement)

Example 3 with GamedayTickerClickListener

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

the class CompLevelStartingNotification 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_comp_level_starting, null, false);
        holder = new ViewHolder();
        holder.header = (TextView) convertView.findViewById(R.id.card_header);
        holder.title = (TextView) convertView.findViewById(R.id.title);
        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.title.setText(c.getString(R.string.notification_level_starting_gameday_details, getCompLevelNameFromAbbreviation(c, compLevelAbbrev)));
    holder.time.setText(getNotificationTimeString(c));
    holder.summaryContainer.setOnClickListener(new GamedayTickerClickListener(c, this));
    return convertView;
}
Also used : GamedayTickerClickListener(com.thebluealliance.androidclient.listeners.GamedayTickerClickListener)

Example 4 with GamedayTickerClickListener

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

the class ScoreNotificationItemView method bind.

@Override
public void bind(ScoreNotificationViewModel model) {
    header.setText(model.getHeader());
    title.setText(model.getTitle());
    time.setText(model.getNotificationTime());
    summaryContainer.setOnClickListener(new GamedayTickerClickListener(getContext(), model.getIntent()));
    MatchListElement renderedMatch = mRenderer.renderFromModel(model.getMatch(), MatchRenderer.RENDER_NOTIFICATION);
    if (renderedMatch != null) {
        renderedMatch.getView(getContext(), LayoutInflater.from(getContext()), matchView);
    }
}
Also used : GamedayTickerClickListener(com.thebluealliance.androidclient.listeners.GamedayTickerClickListener) MatchListElement(com.thebluealliance.androidclient.listitems.MatchListElement)

Example 5 with GamedayTickerClickListener

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

the class AllianceSelectionNotificationItemView method bind.

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

Aggregations

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