resolucao de uns erros
This commit is contained in:
@@ -74,16 +74,6 @@ public class StandingsAdapter extends RecyclerView.Adapter<StandingsAdapter.View
|
||||
holder.textLost.setText(String.valueOf(team.getLost()));
|
||||
holder.textGoalDiff.setText(String.valueOf(team.getGoalDifference()));
|
||||
holder.textPoints.setText(String.valueOf(team.getPoints()));
|
||||
|
||||
if (team.getImageUrl() != null && !team.getImageUrl().isEmpty()) {
|
||||
Glide.with(holder.itemView.getContext())
|
||||
.load(team.getImageUrl())
|
||||
.placeholder(R.mipmap.ic_launcher)
|
||||
.error(R.mipmap.ic_launcher)
|
||||
.into(holder.imageLogo);
|
||||
} else {
|
||||
holder.imageLogo.setImageResource(R.mipmap.ic_launcher);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -11,6 +11,7 @@ public class Team {
|
||||
private int goalsFor;
|
||||
private int goalsAgainst;
|
||||
private int goalDifference;
|
||||
private String imageUrl;
|
||||
|
||||
public Team() {
|
||||
// Required empty constructor for Firebase
|
||||
@@ -103,4 +104,12 @@ public class Team {
|
||||
public void setGoalDifference(int goalDifference) {
|
||||
this.goalDifference = goalDifference;
|
||||
}
|
||||
|
||||
public String getImageUrl() {
|
||||
return imageUrl;
|
||||
}
|
||||
|
||||
public void setImageUrl(String imageUrl) {
|
||||
this.imageUrl = imageUrl;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user