mirror of
https://github.com/Team4388/RidgeScout.git
synced 2026-06-08 16:28:00 -06:00
Fix TBA Event coloring
This commit is contained in:
@@ -164,6 +164,9 @@ public class ScoutingFragment extends Fragment {
|
||||
} else {
|
||||
int teamNum = SettingsManager.getTeamNum();
|
||||
int curMatchNum = SettingsManager.getMatchNum();
|
||||
|
||||
binding.textMatchAlliance.setText("Match: " + (curMatchNum+1) + ", " + SettingsManager.getAllyPos());
|
||||
|
||||
int nextMatch;
|
||||
try {
|
||||
nextMatch = event.getNextTeamMatch(teamNum, curMatchNum).matchIndex;
|
||||
@@ -172,7 +175,6 @@ public class ScoutingFragment extends Fragment {
|
||||
return;
|
||||
}
|
||||
|
||||
binding.textMatchAlliance.setText("Match: " + (curMatchNum+1) + ", " + SettingsManager.getAllyPos());
|
||||
|
||||
binding.infoBox.addView(new TextViewBuilder(getContext(), "Our next match: Match " + nextMatch)
|
||||
.body1()
|
||||
|
||||
@@ -165,12 +165,12 @@ public class TBASelectorFragment extends Fragment {
|
||||
try {
|
||||
Date startDate = format.parse(j.getString("start_date"));
|
||||
Date endDate = format.parse(j.getString("end_date"));
|
||||
if(currentTime.after(endDate)){
|
||||
if(currentTime.after(startDate) && currentTime.before(endDate)) {
|
||||
row.setColor(tba_current);
|
||||
} else if(currentTime.after(endDate)){
|
||||
row.setColor(tba_previous);
|
||||
}else if(currentTime.before(startDate)){
|
||||
row.setColor(tba_next);
|
||||
}else if(currentTime.after(startDate) && currentTime.before(endDate)){
|
||||
row.setColor(tba_current);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
AlertManager.error("Failed finding start and end dates!", e);
|
||||
|
||||
@@ -67,9 +67,9 @@ public class Colors {
|
||||
public static final int fileselector_unselected_color = 0x50006600;
|
||||
|
||||
// TBA
|
||||
public static final int tba_previous = 0x30FF0000;
|
||||
public static final int tba_current = 0x50ff0000;
|
||||
public static final int tba_next = 0x30FFFF00;
|
||||
public static final int tba_previous = Color.argb(30, 64,64,64);
|
||||
public static final int tba_current = 0x7f00ff00;
|
||||
public static final int tba_next = Color.argb(30, 192,192,192);
|
||||
public static final int tba_red = 0x50ff0000;
|
||||
public static final int tba_blue = 0x500000ff;
|
||||
public static final int tba_toggle_background = 0x30000000;
|
||||
|
||||
Reference in New Issue
Block a user