resolucao de uns erros

This commit is contained in:
2026-03-17 15:39:49 +00:00
parent 91fde336b3
commit 0fbbd77f9f
2 changed files with 9 additions and 10 deletions

View File

@@ -74,16 +74,6 @@ public class StandingsAdapter extends RecyclerView.Adapter<StandingsAdapter.View
holder.textLost.setText(String.valueOf(team.getLost())); holder.textLost.setText(String.valueOf(team.getLost()));
holder.textGoalDiff.setText(String.valueOf(team.getGoalDifference())); holder.textGoalDiff.setText(String.valueOf(team.getGoalDifference()));
holder.textPoints.setText(String.valueOf(team.getPoints())); 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 @Override

View File

@@ -11,6 +11,7 @@ public class Team {
private int goalsFor; private int goalsFor;
private int goalsAgainst; private int goalsAgainst;
private int goalDifference; private int goalDifference;
private String imageUrl;
public Team() { public Team() {
// Required empty constructor for Firebase // Required empty constructor for Firebase
@@ -103,4 +104,12 @@ public class Team {
public void setGoalDifference(int goalDifference) { public void setGoalDifference(int goalDifference) {
this.goalDifference = goalDifference; this.goalDifference = goalDifference;
} }
public String getImageUrl() {
return imageUrl;
}
public void setImageUrl(String imageUrl) {
this.imageUrl = imageUrl;
}
} }