GridCalendarRecyclerAdapter.java 文件源码

java
阅读 24 收藏 0 点赞 0 评论 0

项目:Android-Scrapper 作者:
private void setTexts(Game game) {
    leagueName.setText(
            game.getLeagueType().getAcronym() + " - " + game.getLeagueType().getScoreType());
    gameFound.setVisibility(StringUtils.isNull(game.getGameUrl()) ? View.INVISIBLE : View.VISIBLE);

    dateTime.setText(
            DateTimeFormat.forPattern("MMM dd  hh:mm aa").print(new DateTime(game.getGameDateTime(), Constants.DATE.VEGAS_TIME_ZONE).toDateTime(DateTimeZone.getDefault())));

    if (game.getFirstTeam().getName().equals(DefaultFactory.Team.NAME)) {
        firstTeamTitle.setText(game.getFirstTeam().getCity());
        firstTeamSubtitle.setText("-");
    } else {
        firstTeamTitle.setText(game.getFirstTeam().getName() + " " + String.valueOf(game.getFirstTeamScore()));
        firstTeamSubtitle.setText(game.getFirstTeam().getCity());
    }
    if (game.getSecondTeam().getName().equals(DefaultFactory.Team.NAME)) {
        secondTeamTitle.setText(game.getSecondTeam().getCity());
        secondTeamSubtitle.setText("-");
    } else {
        secondTeamTitle.setText(game.getSecondTeam().getName() + " " + String.valueOf(game.getSecondTeamScore()));
        secondTeamSubtitle.setText(game.getSecondTeam().getCity());
    }
    bidAmount.setText(mContext.getString(R.string.bid_amount,
            game.getLeagueType() instanceof Soccer_Spread ? "(" + (int) game.getVIBid().getVigAmount() + ") " : game.getVIBid().getCondition().getValue().replace("spread", ""),
            String.valueOf(game.getVIBid().getBidAmount())));
    if (game.getGroup() != -1) {
        numberText.setText(String.valueOf(game.getGroup()));
    } else {
        numberText.setText("");
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号