use of com.thebluealliance.androidclient.views.MatchView in project the-blue-alliance-android by the-blue-alliance.
the class MatchListElement method getView.
@Override
public View getView(final Context context, LayoutInflater inflater, View convertView) {
if (convertView == null || !(convertView instanceof MatchView)) {
convertView = inflater.inflate(R.layout.match_view, null);
}
MatchView match = (MatchView) convertView;
boolean played = false;
if (!redScore.contains("?") && !blueScore.contains("?")) {
played = true;
}
match.initWithParams(videoKey, matchTitle, redTeams, blueTeams, redScore, blueScore, winner, matchKey, time, selectedTeamKey, showVideoIcon, redExtraRp, blueExtraRp);
match.showColumnHeaders(showColumnHeaders);
if (played) {
match.showTime(false);
match.showScores(true);
} else {
match.showTime(true);
match.showScores(false);
}
if (time == -1) {
match.showTime(false);
}
match.setClickToShowDetails(clickable);
match.showMatchTitle(showMatchTitle);
return match;
}
Aggregations