mirror of
https://github.com/Team4388/RidgeScout.git
synced 2026-06-09 00:37:59 -06:00
Standardize colors
This commit is contained in:
@@ -1,5 +1,10 @@
|
|||||||
package com.ridgebotics.ridgescout.types.input;
|
package com.ridgebotics.ridgescout.types.input;
|
||||||
|
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.chart_background;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.checkbox_colors;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.checkbox_data_color;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.checkbox_value_text_color;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@@ -102,10 +107,6 @@ public class CheckboxType extends FieldType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static int[] colors = {0x7f00ff00, 0x7f7f0000};
|
|
||||||
|
|
||||||
|
|
||||||
public void add_compiled_view(LinearLayout parent, DataType[] data){
|
public void add_compiled_view(LinearLayout parent, DataType[] data){
|
||||||
PieChart chart = new PieChart(parent.getContext());
|
PieChart chart = new PieChart(parent.getContext());
|
||||||
FrameLayout.LayoutParams layout = new FrameLayout.LayoutParams(
|
FrameLayout.LayoutParams layout = new FrameLayout.LayoutParams(
|
||||||
@@ -135,7 +136,7 @@ public class CheckboxType extends FieldType {
|
|||||||
entries.add(new PieEntry((float) numFalse, "False"));
|
entries.add(new PieEntry((float) numFalse, "False"));
|
||||||
|
|
||||||
PieDataSet pieDataSet = new PieDataSet(entries, name);
|
PieDataSet pieDataSet = new PieDataSet(entries, name);
|
||||||
pieDataSet.setColors(colors);
|
pieDataSet.setColors(checkbox_colors);
|
||||||
PieData pieData = new PieData(pieDataSet);
|
PieData pieData = new PieData(pieDataSet);
|
||||||
chart.setDrawHoleEnabled(false);
|
chart.setDrawHoleEnabled(false);
|
||||||
chart.setData(pieData);
|
chart.setData(pieData);
|
||||||
@@ -154,7 +155,7 @@ public class CheckboxType extends FieldType {
|
|||||||
);
|
);
|
||||||
layout.height = 350;
|
layout.height = 350;
|
||||||
chart.setLayoutParams(layout);
|
chart.setLayoutParams(layout);
|
||||||
chart.setBackgroundColor(0xff252025);
|
chart.setBackgroundColor(chart_background);
|
||||||
|
|
||||||
LineData lineData = new LineData();
|
LineData lineData = new LineData();
|
||||||
|
|
||||||
@@ -170,11 +171,11 @@ public class CheckboxType extends FieldType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
LineDataSet dataSet = new LineDataSet(entries, "is checked");
|
LineDataSet dataSet = new LineDataSet(entries, "is checked");
|
||||||
dataSet.setColor(Color.RED);
|
dataSet.setColor(checkbox_data_color);
|
||||||
dataSet.setValueTextColor(Color.BLACK);
|
dataSet.setValueTextColor(Color.BLACK);
|
||||||
dataSet.setDrawCircles(false);
|
dataSet.setDrawCircles(false);
|
||||||
dataSet.setDrawValues(false);
|
dataSet.setDrawValues(false);
|
||||||
dataSet.setValueTextColor(Color.RED);
|
dataSet.setValueTextColor(checkbox_value_text_color);
|
||||||
lineData.addDataSet(dataSet);
|
lineData.addDataSet(dataSet);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
package com.ridgebotics.ridgescout.types.input;
|
package com.ridgebotics.ridgescout.types.input;
|
||||||
|
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.chart_background;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.chart_text;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.dropdown_value_text_1;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.dropdown_value_text_2;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
@@ -142,7 +147,7 @@ public class DropdownType extends FieldType {
|
|||||||
);
|
);
|
||||||
layout.height = 350;
|
layout.height = 350;
|
||||||
chart.setLayoutParams(layout);
|
chart.setLayoutParams(layout);
|
||||||
chart.setBackgroundColor(0xff252025);
|
chart.setBackgroundColor(chart_background);
|
||||||
parent.addView(chart);
|
parent.addView(chart);
|
||||||
|
|
||||||
int[] data_2 = new int[text_options.length];
|
int[] data_2 = new int[text_options.length];
|
||||||
@@ -176,7 +181,7 @@ public class DropdownType extends FieldType {
|
|||||||
);
|
);
|
||||||
layout.height = 350;
|
layout.height = 350;
|
||||||
chart.setLayoutParams(layout);
|
chart.setLayoutParams(layout);
|
||||||
chart.setBackgroundColor(0xff252025);
|
chart.setBackgroundColor(chart_background);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -198,10 +203,10 @@ public class DropdownType extends FieldType {
|
|||||||
|
|
||||||
LineDataSet dataSet = new LineDataSet(entries, text_options[i]);
|
LineDataSet dataSet = new LineDataSet(entries, text_options[i]);
|
||||||
dataSet.setColor(colors[i]);
|
dataSet.setColor(colors[i]);
|
||||||
dataSet.setValueTextColor(Color.BLACK);
|
dataSet.setValueTextColor(dropdown_value_text_1);
|
||||||
dataSet.setDrawCircles(false);
|
dataSet.setDrawCircles(false);
|
||||||
dataSet.setDrawValues(false);
|
dataSet.setDrawValues(false);
|
||||||
dataSet.setValueTextColor(Color.RED);
|
dataSet.setValueTextColor(dropdown_value_text_2);
|
||||||
lineData.addDataSet(dataSet);
|
lineData.addDataSet(dataSet);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -217,9 +222,9 @@ public class DropdownType extends FieldType {
|
|||||||
chart.setScaleEnabled(false);
|
chart.setScaleEnabled(false);
|
||||||
|
|
||||||
|
|
||||||
chart.getXAxis().setTextColor(Color.WHITE);
|
chart.getXAxis().setTextColor(chart_text);
|
||||||
chart.getAxisLeft().setTextColor(Color.WHITE);
|
chart.getAxisLeft().setTextColor(chart_text);
|
||||||
chart.getAxisRight().setTextColor(Color.WHITE);
|
chart.getAxisRight().setTextColor(chart_text);
|
||||||
|
|
||||||
chart.getAxisLeft().setAxisMinimum(0.f);
|
chart.getAxisLeft().setAxisMinimum(0.f);
|
||||||
chart.getAxisLeft().setAxisMaximum(1.f);
|
chart.getAxisLeft().setAxisMaximum(1.f);
|
||||||
@@ -228,7 +233,7 @@ public class DropdownType extends FieldType {
|
|||||||
chart.getAxisRight().setAxisMaximum(1.f);
|
chart.getAxisRight().setAxisMaximum(1.f);
|
||||||
|
|
||||||
Legend legend = chart.getLegend();
|
Legend legend = chart.getLegend();
|
||||||
legend.setTextColor(Color.WHITE);
|
legend.setTextColor(chart_text);
|
||||||
|
|
||||||
chart.invalidate();
|
chart.invalidate();
|
||||||
parent.addView(chart);
|
parent.addView(chart);
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
package com.ridgebotics.ridgescout.types.input;
|
package com.ridgebotics.ridgescout.types.input;
|
||||||
|
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.background_color;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.chart_background;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.chart_text;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.dropdown_value_text_1;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.dropdown_value_text_2;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.fieldpos_data;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@@ -167,7 +174,7 @@ public class FieldposType extends FieldType {
|
|||||||
);
|
);
|
||||||
layout.height = 350;
|
layout.height = 350;
|
||||||
chart.setLayoutParams(layout);
|
chart.setLayoutParams(layout);
|
||||||
chart.setBackgroundColor(0xff252025);
|
chart.setBackgroundColor(chart_background);
|
||||||
|
|
||||||
int min = 0;
|
int min = 0;
|
||||||
int max = 255;
|
int max = 255;
|
||||||
@@ -181,8 +188,8 @@ public class FieldposType extends FieldType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
LineDataSet dataSet = new LineDataSet(entries, "Field position Y value");
|
LineDataSet dataSet = new LineDataSet(entries, "Field position Y value");
|
||||||
dataSet.setColor(Color.BLUE);
|
dataSet.setColor(fieldpos_data);
|
||||||
dataSet.setValueTextColor(Color.BLACK);
|
dataSet.setValueTextColor(dropdown_value_text_1);
|
||||||
dataSet.setDrawCircles(false);
|
dataSet.setDrawCircles(false);
|
||||||
dataSet.setDrawValues(false);
|
dataSet.setDrawValues(false);
|
||||||
|
|
||||||
@@ -196,14 +203,14 @@ public class FieldposType extends FieldType {
|
|||||||
chart.setDragEnabled(false);
|
chart.setDragEnabled(false);
|
||||||
chart.setScaleEnabled(false);
|
chart.setScaleEnabled(false);
|
||||||
|
|
||||||
dataSet.setValueTextColor(Color.RED);
|
dataSet.setValueTextColor(dropdown_value_text_2);
|
||||||
|
|
||||||
chart.getXAxis().setTextColor(Color.WHITE);
|
chart.getXAxis().setTextColor(chart_text);
|
||||||
chart.getAxisLeft().setTextColor(Color.WHITE);
|
chart.getAxisLeft().setTextColor(chart_text);
|
||||||
chart.getAxisRight().setTextColor(Color.WHITE);
|
chart.getAxisRight().setTextColor(chart_text);
|
||||||
|
|
||||||
Legend legend = chart.getLegend();
|
Legend legend = chart.getLegend();
|
||||||
legend.setTextColor(Color.WHITE);
|
legend.setTextColor(chart_text);
|
||||||
|
|
||||||
|
|
||||||
chart.getAxisLeft().setAxisMinimum(min);
|
chart.getAxisLeft().setAxisMinimum(min);
|
||||||
|
|||||||
@@ -2,6 +2,13 @@ package com.ridgebotics.ridgescout.types.input;
|
|||||||
|
|
||||||
import static android.text.InputType.TYPE_CLASS_NUMBER;
|
import static android.text.InputType.TYPE_CLASS_NUMBER;
|
||||||
|
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.background_color;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.chart_background;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.chart_text;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.dropdown_value_text_1;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.dropdown_value_text_2;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.number_data;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
@@ -182,7 +189,7 @@ public class NumberType extends FieldType {
|
|||||||
);
|
);
|
||||||
layout.height = 350;
|
layout.height = 350;
|
||||||
chart.setLayoutParams(layout);
|
chart.setLayoutParams(layout);
|
||||||
chart.setBackgroundColor(0xff252025);
|
chart.setBackgroundColor(chart_background);
|
||||||
|
|
||||||
int min = findMin(data);
|
int min = findMin(data);
|
||||||
int max = findMax(data);
|
int max = findMax(data);
|
||||||
@@ -207,8 +214,8 @@ public class NumberType extends FieldType {
|
|||||||
|
|
||||||
|
|
||||||
LineDataSet dataSet = new LineDataSet(entries, name);
|
LineDataSet dataSet = new LineDataSet(entries, name);
|
||||||
dataSet.setColor(Color.BLUE);
|
dataSet.setColor(number_data);
|
||||||
dataSet.setValueTextColor(Color.BLACK);
|
dataSet.setValueTextColor(dropdown_value_text_1);
|
||||||
dataSet.setDrawCircles(false);
|
dataSet.setDrawCircles(false);
|
||||||
dataSet.setDrawValues(false);
|
dataSet.setDrawValues(false);
|
||||||
|
|
||||||
@@ -223,7 +230,7 @@ public class NumberType extends FieldType {
|
|||||||
|
|
||||||
|
|
||||||
LineDataSet normalDistSet = new LineDataSet(normalDistEntries, "Normal Distribution");
|
LineDataSet normalDistSet = new LineDataSet(normalDistEntries, "Normal Distribution");
|
||||||
normalDistSet.setColor(Color.RED);
|
normalDistSet.setColor(dropdown_value_text_2);
|
||||||
normalDistSet.setDrawCircles(false);
|
normalDistSet.setDrawCircles(false);
|
||||||
normalDistSet.setDrawValues(false);
|
normalDistSet.setDrawValues(false);
|
||||||
normalDistSet.setLineWidth(2f);
|
normalDistSet.setLineWidth(2f);
|
||||||
@@ -238,14 +245,14 @@ public class NumberType extends FieldType {
|
|||||||
chart.setDragEnabled(false);
|
chart.setDragEnabled(false);
|
||||||
chart.setScaleEnabled(false);
|
chart.setScaleEnabled(false);
|
||||||
|
|
||||||
dataSet.setValueTextColor(Color.RED);
|
dataSet.setValueTextColor(dropdown_value_text_2);
|
||||||
|
|
||||||
chart.getXAxis().setTextColor(Color.WHITE);
|
chart.getXAxis().setTextColor(chart_text);
|
||||||
chart.getAxisLeft().setTextColor(Color.WHITE);
|
chart.getAxisLeft().setTextColor(chart_text);
|
||||||
chart.getAxisRight().setTextColor(Color.WHITE);
|
chart.getAxisRight().setTextColor(chart_text);
|
||||||
|
|
||||||
Legend legend = chart.getLegend();
|
Legend legend = chart.getLegend();
|
||||||
legend.setTextColor(Color.WHITE);
|
legend.setTextColor(chart_text);
|
||||||
|
|
||||||
parent.addView(chart);
|
parent.addView(chart);
|
||||||
}
|
}
|
||||||
@@ -261,7 +268,7 @@ public class NumberType extends FieldType {
|
|||||||
);
|
);
|
||||||
layout.height = 350;
|
layout.height = 350;
|
||||||
chart.setLayoutParams(layout);
|
chart.setLayoutParams(layout);
|
||||||
chart.setBackgroundColor(0xff252025);
|
chart.setBackgroundColor(chart_background);
|
||||||
|
|
||||||
int min = findMin(data);
|
int min = findMin(data);
|
||||||
int max = findMax(data);
|
int max = findMax(data);
|
||||||
@@ -276,8 +283,8 @@ public class NumberType extends FieldType {
|
|||||||
|
|
||||||
|
|
||||||
LineDataSet dataSet = new LineDataSet(entries, name);
|
LineDataSet dataSet = new LineDataSet(entries, name);
|
||||||
dataSet.setColor(Color.BLUE);
|
dataSet.setColor(number_data);
|
||||||
dataSet.setValueTextColor(Color.BLACK);
|
dataSet.setValueTextColor(dropdown_value_text_1);
|
||||||
dataSet.setDrawCircles(false);
|
dataSet.setDrawCircles(false);
|
||||||
dataSet.setDrawValues(false);
|
dataSet.setDrawValues(false);
|
||||||
|
|
||||||
@@ -291,14 +298,14 @@ public class NumberType extends FieldType {
|
|||||||
chart.setDragEnabled(false);
|
chart.setDragEnabled(false);
|
||||||
chart.setScaleEnabled(false);
|
chart.setScaleEnabled(false);
|
||||||
|
|
||||||
dataSet.setValueTextColor(Color.RED);
|
dataSet.setValueTextColor(dropdown_value_text_2);
|
||||||
|
|
||||||
chart.getXAxis().setTextColor(Color.WHITE);
|
chart.getXAxis().setTextColor(chart_text);
|
||||||
chart.getAxisLeft().setTextColor(Color.WHITE);
|
chart.getAxisLeft().setTextColor(chart_text);
|
||||||
chart.getAxisRight().setTextColor(Color.WHITE);
|
chart.getAxisRight().setTextColor(chart_text);
|
||||||
|
|
||||||
Legend legend = chart.getLegend();
|
Legend legend = chart.getLegend();
|
||||||
legend.setTextColor(Color.WHITE);
|
legend.setTextColor(chart_text);
|
||||||
|
|
||||||
|
|
||||||
chart.getAxisLeft().setAxisMinimum(min);
|
chart.getAxisLeft().setAxisMinimum(min);
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
package com.ridgebotics.ridgescout.types.input;
|
package com.ridgebotics.ridgescout.types.input;
|
||||||
|
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.chart_background;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.chart_text;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.dropdown_value_text_1;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.dropdown_value_text_2;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.slider_data;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@@ -175,7 +181,7 @@ public class SliderType extends FieldType {
|
|||||||
);
|
);
|
||||||
layout.height = 350;
|
layout.height = 350;
|
||||||
chart.setLayoutParams(layout);
|
chart.setLayoutParams(layout);
|
||||||
chart.setBackgroundColor(0xff252025);
|
chart.setBackgroundColor(chart_background);
|
||||||
|
|
||||||
int[] values = new int[max-min+1];
|
int[] values = new int[max-min+1];
|
||||||
|
|
||||||
@@ -197,8 +203,8 @@ public class SliderType extends FieldType {
|
|||||||
|
|
||||||
|
|
||||||
LineDataSet dataSet = new LineDataSet(entries, name);
|
LineDataSet dataSet = new LineDataSet(entries, name);
|
||||||
dataSet.setColor(Color.BLUE);
|
dataSet.setColor(slider_data);
|
||||||
dataSet.setValueTextColor(Color.BLACK);
|
dataSet.setValueTextColor(dropdown_value_text_1);
|
||||||
dataSet.setDrawCircles(false);
|
dataSet.setDrawCircles(false);
|
||||||
dataSet.setDrawValues(false);
|
dataSet.setDrawValues(false);
|
||||||
|
|
||||||
@@ -213,7 +219,7 @@ public class SliderType extends FieldType {
|
|||||||
|
|
||||||
|
|
||||||
LineDataSet normalDistSet = new LineDataSet(normalDistEntries, "Normal Distribution");
|
LineDataSet normalDistSet = new LineDataSet(normalDistEntries, "Normal Distribution");
|
||||||
normalDistSet.setColor(Color.RED);
|
normalDistSet.setColor(dropdown_value_text_2);
|
||||||
normalDistSet.setDrawCircles(false);
|
normalDistSet.setDrawCircles(false);
|
||||||
normalDistSet.setDrawValues(false);
|
normalDistSet.setDrawValues(false);
|
||||||
normalDistSet.setLineWidth(2f);
|
normalDistSet.setLineWidth(2f);
|
||||||
@@ -228,14 +234,14 @@ public class SliderType extends FieldType {
|
|||||||
chart.setDragEnabled(false);
|
chart.setDragEnabled(false);
|
||||||
chart.setScaleEnabled(false);
|
chart.setScaleEnabled(false);
|
||||||
|
|
||||||
dataSet.setValueTextColor(Color.RED);
|
dataSet.setValueTextColor(dropdown_value_text_2);
|
||||||
|
|
||||||
chart.getXAxis().setTextColor(Color.WHITE);
|
chart.getXAxis().setTextColor(chart_text);
|
||||||
chart.getAxisLeft().setTextColor(Color.WHITE);
|
chart.getAxisLeft().setTextColor(chart_text);
|
||||||
chart.getAxisRight().setTextColor(Color.WHITE);
|
chart.getAxisRight().setTextColor(chart_text);
|
||||||
|
|
||||||
Legend legend = chart.getLegend();
|
Legend legend = chart.getLegend();
|
||||||
legend.setTextColor(Color.WHITE);
|
legend.setTextColor(chart_text);
|
||||||
|
|
||||||
parent.addView(chart);
|
parent.addView(chart);
|
||||||
}
|
}
|
||||||
@@ -251,7 +257,7 @@ public class SliderType extends FieldType {
|
|||||||
);
|
);
|
||||||
layout.height = 350;
|
layout.height = 350;
|
||||||
chart.setLayoutParams(layout);
|
chart.setLayoutParams(layout);
|
||||||
chart.setBackgroundColor(0xff252025);
|
chart.setBackgroundColor(chart_background);
|
||||||
|
|
||||||
List<Entry> entries = new ArrayList<>();
|
List<Entry> entries = new ArrayList<>();
|
||||||
for (int i = 0; i < data.length; i++){
|
for (int i = 0; i < data.length; i++){
|
||||||
@@ -263,8 +269,8 @@ public class SliderType extends FieldType {
|
|||||||
|
|
||||||
|
|
||||||
LineDataSet dataSet = new LineDataSet(entries, name);
|
LineDataSet dataSet = new LineDataSet(entries, name);
|
||||||
dataSet.setColor(Color.BLUE);
|
dataSet.setColor(slider_data);
|
||||||
dataSet.setValueTextColor(Color.BLACK);
|
dataSet.setValueTextColor(dropdown_value_text_1);
|
||||||
dataSet.setDrawCircles(false);
|
dataSet.setDrawCircles(false);
|
||||||
dataSet.setDrawValues(false);
|
dataSet.setDrawValues(false);
|
||||||
|
|
||||||
@@ -278,14 +284,14 @@ public class SliderType extends FieldType {
|
|||||||
chart.setDragEnabled(false);
|
chart.setDragEnabled(false);
|
||||||
chart.setScaleEnabled(false);
|
chart.setScaleEnabled(false);
|
||||||
|
|
||||||
dataSet.setValueTextColor(Color.RED);
|
dataSet.setValueTextColor(dropdown_value_text_2);
|
||||||
|
|
||||||
chart.getXAxis().setTextColor(Color.WHITE);
|
chart.getXAxis().setTextColor(chart_text);
|
||||||
chart.getAxisLeft().setTextColor(Color.WHITE);
|
chart.getAxisLeft().setTextColor(chart_text);
|
||||||
chart.getAxisRight().setTextColor(Color.WHITE);
|
chart.getAxisRight().setTextColor(chart_text);
|
||||||
|
|
||||||
Legend legend = chart.getLegend();
|
Legend legend = chart.getLegend();
|
||||||
legend.setTextColor(Color.WHITE);
|
legend.setTextColor(chart_text);
|
||||||
|
|
||||||
|
|
||||||
chart.getAxisLeft().setAxisMinimum(min);
|
chart.getAxisLeft().setAxisMinimum(min);
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
package com.ridgebotics.ridgescout.types.input;
|
package com.ridgebotics.ridgescout.types.input;
|
||||||
|
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.chart_background;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.chart_text;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.dropdown_value_text_1;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.dropdown_value_text_2;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.tally_data;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
@@ -192,8 +198,8 @@ public class TallyType extends FieldType {
|
|||||||
|
|
||||||
|
|
||||||
LineDataSet dataSet = new LineDataSet(entries, name);
|
LineDataSet dataSet = new LineDataSet(entries, name);
|
||||||
dataSet.setColor(Color.BLUE);
|
dataSet.setColor(tally_data);
|
||||||
dataSet.setValueTextColor(Color.BLACK);
|
dataSet.setValueTextColor(dropdown_value_text_1);
|
||||||
dataSet.setDrawCircles(false);
|
dataSet.setDrawCircles(false);
|
||||||
dataSet.setDrawValues(false);
|
dataSet.setDrawValues(false);
|
||||||
|
|
||||||
@@ -208,7 +214,7 @@ public class TallyType extends FieldType {
|
|||||||
|
|
||||||
|
|
||||||
LineDataSet normalDistSet = new LineDataSet(normalDistEntries, "Normal Distribution");
|
LineDataSet normalDistSet = new LineDataSet(normalDistEntries, "Normal Distribution");
|
||||||
normalDistSet.setColor(Color.RED);
|
normalDistSet.setColor(dropdown_value_text_2);
|
||||||
normalDistSet.setDrawCircles(false);
|
normalDistSet.setDrawCircles(false);
|
||||||
normalDistSet.setDrawValues(false);
|
normalDistSet.setDrawValues(false);
|
||||||
normalDistSet.setLineWidth(2f);
|
normalDistSet.setLineWidth(2f);
|
||||||
@@ -223,14 +229,14 @@ public class TallyType extends FieldType {
|
|||||||
chart.setDragEnabled(false);
|
chart.setDragEnabled(false);
|
||||||
chart.setScaleEnabled(false);
|
chart.setScaleEnabled(false);
|
||||||
|
|
||||||
dataSet.setValueTextColor(Color.RED);
|
dataSet.setValueTextColor(dropdown_value_text_2);
|
||||||
|
|
||||||
chart.getXAxis().setTextColor(Color.WHITE);
|
chart.getXAxis().setTextColor(chart_text);
|
||||||
chart.getAxisLeft().setTextColor(Color.WHITE);
|
chart.getAxisLeft().setTextColor(chart_text);
|
||||||
chart.getAxisRight().setTextColor(Color.WHITE);
|
chart.getAxisRight().setTextColor(chart_text);
|
||||||
|
|
||||||
Legend legend = chart.getLegend();
|
Legend legend = chart.getLegend();
|
||||||
legend.setTextColor(Color.WHITE);
|
legend.setTextColor(chart_text);
|
||||||
|
|
||||||
parent.addView(chart);
|
parent.addView(chart);
|
||||||
}
|
}
|
||||||
@@ -246,7 +252,7 @@ public class TallyType extends FieldType {
|
|||||||
);
|
);
|
||||||
layout.height = 350;
|
layout.height = 350;
|
||||||
chart.setLayoutParams(layout);
|
chart.setLayoutParams(layout);
|
||||||
chart.setBackgroundColor(0xff252025);
|
chart.setBackgroundColor(chart_background);
|
||||||
|
|
||||||
int min = findMin(data);
|
int min = findMin(data);
|
||||||
int max = findMax(data);
|
int max = findMax(data);
|
||||||
@@ -261,8 +267,8 @@ public class TallyType extends FieldType {
|
|||||||
|
|
||||||
|
|
||||||
LineDataSet dataSet = new LineDataSet(entries, name);
|
LineDataSet dataSet = new LineDataSet(entries, name);
|
||||||
dataSet.setColor(Color.BLUE);
|
dataSet.setColor(tally_data);
|
||||||
dataSet.setValueTextColor(Color.BLACK);
|
dataSet.setValueTextColor(dropdown_value_text_1);
|
||||||
dataSet.setDrawCircles(false);
|
dataSet.setDrawCircles(false);
|
||||||
dataSet.setDrawValues(false);
|
dataSet.setDrawValues(false);
|
||||||
|
|
||||||
@@ -276,14 +282,14 @@ public class TallyType extends FieldType {
|
|||||||
chart.setDragEnabled(false);
|
chart.setDragEnabled(false);
|
||||||
chart.setScaleEnabled(false);
|
chart.setScaleEnabled(false);
|
||||||
|
|
||||||
dataSet.setValueTextColor(Color.RED);
|
dataSet.setValueTextColor(dropdown_value_text_2);
|
||||||
|
|
||||||
chart.getXAxis().setTextColor(Color.WHITE);
|
chart.getXAxis().setTextColor(chart_text);
|
||||||
chart.getAxisLeft().setTextColor(Color.WHITE);
|
chart.getAxisLeft().setTextColor(chart_text);
|
||||||
chart.getAxisRight().setTextColor(Color.WHITE);
|
chart.getAxisRight().setTextColor(chart_text);
|
||||||
|
|
||||||
Legend legend = chart.getLegend();
|
Legend legend = chart.getLegend();
|
||||||
legend.setTextColor(Color.WHITE);
|
legend.setTextColor(chart_text);
|
||||||
|
|
||||||
|
|
||||||
chart.getAxisLeft().setAxisMinimum(min);
|
chart.getAxisLeft().setAxisMinimum(min);
|
||||||
@@ -331,7 +337,7 @@ public class TallyType extends FieldType {
|
|||||||
|
|
||||||
// parent.addView(new );
|
// parent.addView(new );
|
||||||
|
|
||||||
Collections.sort(views, (a, b) -> (int) ((b.average - a.average)*10.f));
|
Collections.sort(views, (a, b) -> (int) ((b.average - a.average)*50.f));
|
||||||
for(int i = 0; i < views.size(); i++){
|
for(int i = 0; i < views.size(); i++){
|
||||||
row = new TableRow(parent.getContext());
|
row = new TableRow(parent.getContext());
|
||||||
CandlestickView view = views.get(i);
|
CandlestickView view = views.get(i);
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
package com.ridgebotics.ridgescout.types.input;
|
package com.ridgebotics.ridgescout.types.input;
|
||||||
|
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.chart_background;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.chart_text;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.dropdown_value_text_1;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.dropdown_value_text_2;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.text_data;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
@@ -172,7 +178,7 @@ public class TextType extends FieldType {
|
|||||||
);
|
);
|
||||||
layout.height = 350;
|
layout.height = 350;
|
||||||
chart.setLayoutParams(layout);
|
chart.setLayoutParams(layout);
|
||||||
chart.setBackgroundColor(0xff252025);
|
chart.setBackgroundColor(chart_background);
|
||||||
|
|
||||||
|
|
||||||
List<Entry> entries = new ArrayList<>();
|
List<Entry> entries = new ArrayList<>();
|
||||||
@@ -187,11 +193,11 @@ public class TextType extends FieldType {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
LineDataSet dataSet = new LineDataSet(entries, "Sentiment");
|
LineDataSet dataSet = new LineDataSet(entries, "Sentiment");
|
||||||
dataSet.setColor(Color.BLUE);
|
dataSet.setColor(text_data);
|
||||||
dataSet.setValueTextColor(Color.BLACK);
|
dataSet.setValueTextColor(dropdown_value_text_1);
|
||||||
dataSet.setDrawCircles(false);
|
dataSet.setDrawCircles(false);
|
||||||
dataSet.setDrawValues(false);
|
dataSet.setDrawValues(false);
|
||||||
dataSet.setValueTextColor(Color.RED);
|
dataSet.setValueTextColor(dropdown_value_text_2);
|
||||||
|
|
||||||
|
|
||||||
LineData lineData = new LineData(dataSet);
|
LineData lineData = new LineData(dataSet);
|
||||||
@@ -205,9 +211,9 @@ public class TextType extends FieldType {
|
|||||||
chart.setScaleEnabled(false);
|
chart.setScaleEnabled(false);
|
||||||
|
|
||||||
|
|
||||||
chart.getXAxis().setTextColor(Color.WHITE);
|
chart.getXAxis().setTextColor(chart_text);
|
||||||
chart.getAxisLeft().setTextColor(Color.WHITE);
|
chart.getAxisLeft().setTextColor(chart_text);
|
||||||
chart.getAxisRight().setTextColor(Color.WHITE);
|
chart.getAxisRight().setTextColor(chart_text);
|
||||||
|
|
||||||
chart.getAxisLeft().setAxisMinimum(0.f);
|
chart.getAxisLeft().setAxisMinimum(0.f);
|
||||||
chart.getAxisLeft().setAxisMaximum(1.f);
|
chart.getAxisLeft().setAxisMaximum(1.f);
|
||||||
@@ -216,7 +222,7 @@ public class TextType extends FieldType {
|
|||||||
chart.getAxisRight().setAxisMaximum(1.f);
|
chart.getAxisRight().setAxisMaximum(1.f);
|
||||||
|
|
||||||
Legend legend = chart.getLegend();
|
Legend legend = chart.getLegend();
|
||||||
legend.setTextColor(Color.WHITE);
|
legend.setTextColor(chart_text);
|
||||||
|
|
||||||
chart.invalidate();
|
chart.invalidate();
|
||||||
parent.addView(chart);
|
parent.addView(chart);
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.ridgebotics.ridgescout.ui;
|
package com.ridgebotics.ridgescout.ui;
|
||||||
|
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.candlestick_color;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
@@ -42,12 +44,12 @@ public class CandlestickHeader extends View {
|
|||||||
|
|
||||||
private void init() {
|
private void init() {
|
||||||
linePaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
linePaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||||
linePaint.setColor(Color.GREEN);
|
linePaint.setColor(candlestick_color);
|
||||||
linePaint.setStrokeWidth(2f);
|
linePaint.setStrokeWidth(2f);
|
||||||
linePaint.setStyle(Paint.Style.STROKE);
|
linePaint.setStyle(Paint.Style.STROKE);
|
||||||
|
|
||||||
textPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
textPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||||
textPaint.setColor(Color.GREEN);
|
textPaint.setColor(candlestick_color);
|
||||||
textPaint.setTextSize(30f);
|
textPaint.setTextSize(30f);
|
||||||
textPaint.setTextAlign(Paint.Align.CENTER);
|
textPaint.setTextAlign(Paint.Align.CENTER);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.ridgebotics.ridgescout.ui;
|
package com.ridgebotics.ridgescout.ui;
|
||||||
|
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.candlestick_color;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
@@ -58,21 +60,21 @@ public class CandlestickView extends View {
|
|||||||
private void init() {
|
private void init() {
|
||||||
// Initialize paint objects
|
// Initialize paint objects
|
||||||
boxPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
boxPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||||
boxPaint.setColor(Color.GREEN);
|
boxPaint.setColor(candlestick_color);
|
||||||
boxPaint.setStyle(Paint.Style.STROKE);
|
boxPaint.setStyle(Paint.Style.STROKE);
|
||||||
boxPaint.setStrokeWidth(2f);
|
boxPaint.setStrokeWidth(2f);
|
||||||
|
|
||||||
whiskerPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
whiskerPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||||
whiskerPaint.setColor(Color.GREEN);
|
whiskerPaint.setColor(candlestick_color);
|
||||||
whiskerPaint.setStrokeWidth(2f);
|
whiskerPaint.setStrokeWidth(2f);
|
||||||
whiskerPaint.setStyle(Paint.Style.STROKE);
|
whiskerPaint.setStyle(Paint.Style.STROKE);
|
||||||
|
|
||||||
averagePaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
averagePaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||||
averagePaint.setColor(Color.GREEN);
|
averagePaint.setColor(candlestick_color);
|
||||||
averagePaint.setStrokeWidth(3f);
|
averagePaint.setStrokeWidth(3f);
|
||||||
|
|
||||||
textPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
textPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||||
textPaint.setColor(Color.GREEN);
|
textPaint.setColor(candlestick_color);
|
||||||
textPaint.setTextSize(30f);
|
textPaint.setTextSize(30f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
package com.ridgebotics.ridgescout.ui;
|
package com.ridgebotics.ridgescout.ui;
|
||||||
|
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.toggletitle_black_background;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.toggletitle_no_background;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.toggletitle_unselected;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
@@ -77,14 +81,14 @@ public class ToggleTitleView extends ConstraintLayout {
|
|||||||
enabled = false;
|
enabled = false;
|
||||||
toggle_title_checkbox.setChecked(false);
|
toggle_title_checkbox.setChecked(false);
|
||||||
toggle_title_description.setVisibility(View.GONE);
|
toggle_title_description.setVisibility(View.GONE);
|
||||||
setBackgroundColor(0xffff0000);
|
setBackgroundColor(toggletitle_unselected);
|
||||||
titleView.setTextColor(0xff000000);
|
titleView.setTextColor(toggletitle_black_background);
|
||||||
}
|
}
|
||||||
public void enable(){
|
public void enable(){
|
||||||
enabled = true;
|
enabled = true;
|
||||||
toggle_title_checkbox.setChecked(true);
|
toggle_title_checkbox.setChecked(true);
|
||||||
toggle_title_description.setVisibility(View.VISIBLE);
|
toggle_title_description.setVisibility(View.VISIBLE);
|
||||||
setBackgroundColor(0x00000000);
|
setBackgroundColor(toggletitle_no_background);
|
||||||
titleView.setTextAppearance(com.google.android.material.R.style.TextAppearance_MaterialComponents_Headline5);
|
titleView.setTextAppearance(com.google.android.material.R.style.TextAppearance_MaterialComponents_Headline5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import static android.view.View.GONE;
|
|||||||
import static android.view.View.VISIBLE;
|
import static android.view.View.VISIBLE;
|
||||||
import static androidx.navigation.fragment.FragmentKt.findNavController;
|
import static androidx.navigation.fragment.FragmentKt.findNavController;
|
||||||
|
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.datafragment_option_1;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.datafragment_option_2;
|
||||||
import static com.ridgebotics.ridgescout.utility.DataManager.evcode;
|
import static com.ridgebotics.ridgescout.utility.DataManager.evcode;
|
||||||
import static com.ridgebotics.ridgescout.utility.DataManager.event;
|
import static com.ridgebotics.ridgescout.utility.DataManager.event;
|
||||||
import static com.ridgebotics.ridgescout.utility.DataManager.match_latest_values;
|
import static com.ridgebotics.ridgescout.utility.DataManager.match_latest_values;
|
||||||
@@ -123,7 +125,7 @@ public class DataFragment extends Fragment {
|
|||||||
for(int i = 0; i < match_latest_values.length; i++){
|
for(int i = 0; i < match_latest_values.length; i++){
|
||||||
FieldBorderedRow tr = new FieldBorderedRow(getContext());
|
FieldBorderedRow tr = new FieldBorderedRow(getContext());
|
||||||
tr.fromField(match_latest_values[i]);
|
tr.fromField(match_latest_values[i]);
|
||||||
tr.setColor(i % 2 == 0 ? 0xff509050 : 0xff307030);
|
tr.setColor(i % 2 == 0 ? datafragment_option_1 : datafragment_option_2);
|
||||||
binding.table.addView(tr);
|
binding.table.addView(tr);
|
||||||
|
|
||||||
final int fi = i;
|
final int fi = i;
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.ridgebotics.ridgescout.ui.data;
|
package com.ridgebotics.ridgescout.ui.data;
|
||||||
|
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.toggletitle_black_background;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.toggletitle_unselected;
|
||||||
import static com.ridgebotics.ridgescout.utility.DataManager.evcode;
|
import static com.ridgebotics.ridgescout.utility.DataManager.evcode;
|
||||||
import static com.ridgebotics.ridgescout.utility.DataManager.match_latest_values;
|
import static com.ridgebotics.ridgescout.utility.DataManager.match_latest_values;
|
||||||
import static com.ridgebotics.ridgescout.utility.DataManager.match_transferValues;
|
import static com.ridgebotics.ridgescout.utility.DataManager.match_transferValues;
|
||||||
@@ -150,8 +152,8 @@ public class TeamsFragment extends Fragment {
|
|||||||
tv.setTextSize(25);
|
tv.setTextSize(25);
|
||||||
|
|
||||||
if(psda.data.array[a].isNull()){
|
if(psda.data.array[a].isNull()){
|
||||||
tv.setBackgroundColor(0xffff0000);
|
tv.setBackgroundColor(toggletitle_unselected);
|
||||||
tv.setTextColor(0xff000000);
|
tv.setTextColor(toggletitle_black_background);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -255,8 +257,8 @@ public class TeamsFragment extends Fragment {
|
|||||||
tv.setTextSize(25);
|
tv.setTextSize(25);
|
||||||
|
|
||||||
if (psda.data.array[i].isNull()) {
|
if (psda.data.array[i].isNull()) {
|
||||||
tv.setBackgroundColor(0xffff0000);
|
tv.setBackgroundColor(toggletitle_unselected);
|
||||||
tv.setTextColor(0xff000000);
|
tv.setTextColor(toggletitle_black_background);
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.matchArea.addView(tv);
|
binding.matchArea.addView(tv);
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
package com.ridgebotics.ridgescout.ui.scouting;
|
package com.ridgebotics.ridgescout.ui.scouting;
|
||||||
|
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.color_found;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.color_not_found;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.color_rescout;
|
||||||
import static com.ridgebotics.ridgescout.utility.DataManager.event;
|
import static com.ridgebotics.ridgescout.utility.DataManager.event;
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
@@ -53,11 +56,6 @@ public class EventFragment extends Fragment {
|
|||||||
add_pit_scouting(event);
|
add_pit_scouting(event);
|
||||||
add_match_scouting(event);
|
add_match_scouting(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int color_found = 0x7f00ff00;
|
|
||||||
public static int color_rescout = 0x7f0000ff;
|
|
||||||
public static int color_not_found = 0x7f7f0000;
|
|
||||||
|
|
||||||
private void addTableText(TableRow tr, String textStr){
|
private void addTableText(TableRow tr, String textStr){
|
||||||
TextView text = new TextView(getContext());
|
TextView text = new TextView(getContext());
|
||||||
text.setTextSize(18);
|
text.setTextSize(18);
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
package com.ridgebotics.ridgescout.ui.scouting;
|
package com.ridgebotics.ridgescout.ui.scouting;
|
||||||
|
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.rescout_color;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.saved_color;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.unsaved_color;
|
||||||
import static com.ridgebotics.ridgescout.utility.DataManager.evcode;
|
import static com.ridgebotics.ridgescout.utility.DataManager.evcode;
|
||||||
import static com.ridgebotics.ridgescout.utility.DataManager.event;
|
import static com.ridgebotics.ridgescout.utility.DataManager.event;
|
||||||
|
|
||||||
@@ -127,10 +130,6 @@ public class MatchScoutingFragment extends Fragment {
|
|||||||
return "red-1";
|
return "red-1";
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final int unsaved_color = 0x60ff0000;
|
|
||||||
private static final int saved_color = 0x6000ff00;
|
|
||||||
private static final int rescout_color = 0x600000ff;
|
|
||||||
|
|
||||||
String alliance_position;
|
String alliance_position;
|
||||||
int cur_match_num;
|
int cur_match_num;
|
||||||
String username;
|
String username;
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
package com.ridgebotics.ridgescout.ui.scouting;
|
package com.ridgebotics.ridgescout.ui.scouting;
|
||||||
|
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.rescout_color;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.saved_color;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.unsaved_color;
|
||||||
import static com.ridgebotics.ridgescout.utility.DataManager.evcode;
|
import static com.ridgebotics.ridgescout.utility.DataManager.evcode;
|
||||||
import static com.ridgebotics.ridgescout.utility.DataManager.pit_latest_values;
|
import static com.ridgebotics.ridgescout.utility.DataManager.pit_latest_values;
|
||||||
import static com.ridgebotics.ridgescout.utility.DataManager.pit_transferValues;
|
import static com.ridgebotics.ridgescout.utility.DataManager.pit_transferValues;
|
||||||
@@ -58,11 +61,6 @@ public class PitScoutingFragment extends Fragment {
|
|||||||
|
|
||||||
return binding.getRoot();
|
return binding.getRoot();
|
||||||
}
|
}
|
||||||
private static final int unsaved_color = 0x60ff0000;
|
|
||||||
private static final int saved_color = 0x6000ff00;
|
|
||||||
private static final int rescout_color = 0x600000ff;
|
|
||||||
|
|
||||||
|
|
||||||
boolean edited = false;
|
boolean edited = false;
|
||||||
boolean rescout = false;
|
boolean rescout = false;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
package com.ridgebotics.ridgescout.ui.scouting;
|
package com.ridgebotics.ridgescout.ui.scouting;
|
||||||
|
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.color_found;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.color_not_found;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.color_rescout;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.rescout_color;
|
||||||
import static com.ridgebotics.ridgescout.utility.DataManager.evcode;
|
import static com.ridgebotics.ridgescout.utility.DataManager.evcode;
|
||||||
import static com.ridgebotics.ridgescout.utility.DataManager.event;
|
import static com.ridgebotics.ridgescout.utility.DataManager.event;
|
||||||
|
|
||||||
@@ -109,17 +113,17 @@ public class PitSelectorFragment extends Fragment {
|
|||||||
if (FileEditor.fileExist(filename)) {
|
if (FileEditor.fileExist(filename)) {
|
||||||
final boolean[] rescout = {DataManager.rescout_list.contains(filename)};
|
final boolean[] rescout = {DataManager.rescout_list.contains(filename)};
|
||||||
|
|
||||||
teamRow.setColor(DataManager.rescout_list.contains(filename) ? 0x300000FF : 0x3000FF00);
|
teamRow.setColor(DataManager.rescout_list.contains(filename) ? color_rescout : color_found);
|
||||||
|
|
||||||
teamRow.setOnLongClickListener(v -> {
|
teamRow.setOnLongClickListener(v -> {
|
||||||
rescout[0] = !rescout[0];
|
rescout[0] = !rescout[0];
|
||||||
if(rescout[0]){
|
if(rescout[0]){
|
||||||
DataManager.rescout_list.add(filename);
|
DataManager.rescout_list.add(filename);
|
||||||
teamRow.setColor(0x300000FF);
|
teamRow.setColor(color_rescout);
|
||||||
DataManager.save_rescout_list();
|
DataManager.save_rescout_list();
|
||||||
}else{
|
}else{
|
||||||
DataManager.rescout_list.remove(filename);
|
DataManager.rescout_list.remove(filename);
|
||||||
teamRow.setColor(0x3000FF00);
|
teamRow.setColor(color_found);
|
||||||
DataManager.save_rescout_list();
|
DataManager.save_rescout_list();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,7 +131,7 @@ public class PitSelectorFragment extends Fragment {
|
|||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
teamRow.setColor(0x30FF0000);
|
teamRow.setColor(color_not_found);
|
||||||
teamRow.setOnLongClickListener(v -> true);
|
teamRow.setOnLongClickListener(v -> true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
package com.ridgebotics.ridgescout.ui.settings;
|
package com.ridgebotics.ridgescout.ui.settings;
|
||||||
|
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.background_color;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.unfocused_background_color;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
@@ -47,9 +50,6 @@ public class FieldsFragment extends Fragment {
|
|||||||
List<FieldDisplay> views;
|
List<FieldDisplay> views;
|
||||||
|
|
||||||
|
|
||||||
private static final int background_color = 0x5000ff00;
|
|
||||||
private static final int unfocused_background_color = 0x50118811;
|
|
||||||
|
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
|
||||||
@Nullable Bundle savedInstanceState) {
|
@Nullable Bundle savedInstanceState) {
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.ridgebotics.ridgescout.ui.transfer;
|
package com.ridgebotics.ridgescout.ui.transfer;
|
||||||
|
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.fileselector_selected_color;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.fileselector_unselected_color;
|
||||||
import static com.ridgebotics.ridgescout.utility.DataManager.evcode;
|
import static com.ridgebotics.ridgescout.utility.DataManager.evcode;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@@ -28,8 +30,6 @@ import java.util.Arrays;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class FileSelectorFragment extends Fragment {
|
public class FileSelectorFragment extends Fragment {
|
||||||
private static final int background_color = 0x5000ff00;
|
|
||||||
private static final int unselected_background_color = 0x2000ff00;
|
|
||||||
|
|
||||||
private static on_file_select onSelect = files -> {};
|
private static on_file_select onSelect = files -> {};
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ public class FileSelectorFragment extends Fragment {
|
|||||||
tr.setPadding(20,20,20,20);
|
tr.setPadding(20,20,20,20);
|
||||||
binding.fileSelectorTable.addView(tr);
|
binding.fileSelectorTable.addView(tr);
|
||||||
|
|
||||||
tr.setBackgroundColor(background_color);
|
tr.setBackgroundColor(fileselector_selected_color);
|
||||||
|
|
||||||
CheckBox checkBox = new CheckBox(getContext());
|
CheckBox checkBox = new CheckBox(getContext());
|
||||||
checkBox.setChecked(true);
|
checkBox.setChecked(true);
|
||||||
@@ -83,14 +83,14 @@ public class FileSelectorFragment extends Fragment {
|
|||||||
boolean sel = !selected_arr[fi];
|
boolean sel = !selected_arr[fi];
|
||||||
selected_arr[fi] = sel;
|
selected_arr[fi] = sel;
|
||||||
|
|
||||||
tr.setBackgroundColor(sel ? background_color : unselected_background_color);
|
tr.setBackgroundColor(sel ? fileselector_selected_color : fileselector_unselected_color);
|
||||||
((CheckBox) tr.getChildAt(0)).setChecked(sel);
|
((CheckBox) tr.getChildAt(0)).setChecked(sel);
|
||||||
});
|
});
|
||||||
checkBox.setOnClickListener(view -> {
|
checkBox.setOnClickListener(view -> {
|
||||||
boolean sel = !selected_arr[fi];
|
boolean sel = !selected_arr[fi];
|
||||||
selected_arr[fi] = sel;
|
selected_arr[fi] = sel;
|
||||||
|
|
||||||
tr.setBackgroundColor(sel ? background_color : unselected_background_color);
|
tr.setBackgroundColor(sel ? fileselector_selected_color : fileselector_unselected_color);
|
||||||
((CheckBox) tr.getChildAt(0)).setChecked(sel);
|
((CheckBox) tr.getChildAt(0)).setChecked(sel);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -104,7 +104,7 @@ public class FileSelectorFragment extends Fragment {
|
|||||||
|
|
||||||
for(int i = 0; i < files.length; i++){
|
for(int i = 0; i < files.length; i++){
|
||||||
TableRow child = (TableRow) binding.fileSelectorTable.getChildAt(i);
|
TableRow child = (TableRow) binding.fileSelectorTable.getChildAt(i);
|
||||||
child.setBackgroundColor(background_color);
|
child.setBackgroundColor(fileselector_selected_color);
|
||||||
boolean sel = is_in_search_param(files[i], search_param, match_num_nums);
|
boolean sel = is_in_search_param(files[i], search_param, match_num_nums);
|
||||||
child.setVisibility(sel ? View.VISIBLE : View.GONE);
|
child.setVisibility(sel ? View.VISIBLE : View.GONE);
|
||||||
((CheckBox) child.getChildAt(0)).setChecked(sel);
|
((CheckBox) child.getChildAt(0)).setChecked(sel);
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
package com.ridgebotics.ridgescout.ui.transfer;
|
package com.ridgebotics.ridgescout.ui.transfer;
|
||||||
|
|
||||||
import static androidx.navigation.fragment.FragmentKt.findNavController;
|
import static androidx.navigation.fragment.FragmentKt.findNavController;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.tba_blue;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.tba_red;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.tba_toggle_background;
|
||||||
import static com.ridgebotics.ridgescout.utility.FileEditor.TBAAddress;
|
import static com.ridgebotics.ridgescout.utility.FileEditor.TBAAddress;
|
||||||
import static com.ridgebotics.ridgescout.utility.FileEditor.TBAHeader;
|
import static com.ridgebotics.ridgescout.utility.FileEditor.TBAHeader;
|
||||||
|
|
||||||
@@ -321,7 +324,7 @@ public class TBAEventFragment extends Fragment {
|
|||||||
tr = new TableRow(getContext());
|
tr = new TableRow(getContext());
|
||||||
|
|
||||||
if (toggle) {
|
if (toggle) {
|
||||||
tr.setBackgroundColor(0x30000000);
|
tr.setBackgroundColor(tba_toggle_background);
|
||||||
}
|
}
|
||||||
|
|
||||||
addTableText(tr, String.valueOf(matchCount));
|
addTableText(tr, String.valueOf(matchCount));
|
||||||
@@ -340,12 +343,12 @@ public class TBAEventFragment extends Fragment {
|
|||||||
String str = redAlliance.getString(b).substring(3);
|
String str = redAlliance.getString(b).substring(3);
|
||||||
redKeys[b] = Integer.parseInt(str);
|
redKeys[b] = Integer.parseInt(str);
|
||||||
text.setText(str);
|
text.setText(str);
|
||||||
text.setBackgroundColor(0x50ff0000);
|
text.setBackgroundColor(tba_red);
|
||||||
}else{
|
}else{
|
||||||
String str = blueAlliance.getString(b-3).substring(3);
|
String str = blueAlliance.getString(b-3).substring(3);
|
||||||
blueKeys[b-3] = Integer.parseInt(str);
|
blueKeys[b-3] = Integer.parseInt(str);
|
||||||
text.setText(str);
|
text.setText(str);
|
||||||
text.setBackgroundColor(0x500000ff);
|
text.setBackgroundColor(tba_blue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
package com.ridgebotics.ridgescout.ui.transfer;
|
package com.ridgebotics.ridgescout.ui.transfer;
|
||||||
|
|
||||||
import static androidx.navigation.fragment.FragmentKt.findNavController;
|
import static androidx.navigation.fragment.FragmentKt.findNavController;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.tba_current;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.tba_next;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.tba_previous;
|
||||||
import static com.ridgebotics.ridgescout.utility.FileEditor.TBAAddress;
|
import static com.ridgebotics.ridgescout.utility.FileEditor.TBAAddress;
|
||||||
import static com.ridgebotics.ridgescout.utility.FileEditor.TBAHeader;
|
import static com.ridgebotics.ridgescout.utility.FileEditor.TBAHeader;
|
||||||
|
|
||||||
@@ -175,11 +178,11 @@ public class TBASelectorFragment extends Fragment {
|
|||||||
Date startDate = format.parse(j.getString("start_date"));
|
Date startDate = format.parse(j.getString("start_date"));
|
||||||
Date endDate = format.parse(j.getString("end_date"));
|
Date endDate = format.parse(j.getString("end_date"));
|
||||||
if(currentTime.after(endDate)){
|
if(currentTime.after(endDate)){
|
||||||
row.setColor(0x30FF0000);
|
row.setColor(tba_previous);
|
||||||
}else if(currentTime.before(startDate)){
|
}else if(currentTime.before(startDate)){
|
||||||
row.setColor(0x3000FF00);
|
row.setColor(tba_next);
|
||||||
}else if(currentTime.after(startDate) && currentTime.before(endDate)){
|
}else if(currentTime.after(startDate) && currentTime.before(endDate)){
|
||||||
row.setColor(0x30FFFF00);
|
row.setColor(tba_current);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
AlertManager.error("Failed finding start and end dates!", e);
|
AlertManager.error("Failed finding start and end dates!", e);
|
||||||
|
|||||||
@@ -31,9 +31,6 @@ public class TransferFragment extends Fragment {
|
|||||||
|
|
||||||
String evcode;
|
String evcode;
|
||||||
|
|
||||||
private static final int background_color = 0x5000ff00;
|
|
||||||
private static final int unselected_background_color = 0x2000ff00;
|
|
||||||
|
|
||||||
// private Bundle b;
|
// private Bundle b;
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
|||||||
@@ -2,6 +2,10 @@ package com.ridgebotics.ridgescout.ui.transfer.codes;
|
|||||||
|
|
||||||
// From https://github.com/dlazaro66/QRCodeReaderView/blob/master/samples/src/main/java/com/example/qr_readerexample/PointsOverlayView.java
|
// From https://github.com/dlazaro66/QRCodeReaderView/blob/master/samples/src/main/java/com/example/qr_readerexample/PointsOverlayView.java
|
||||||
|
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.code_scanned_color;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.code_selected_color;
|
||||||
|
import static com.ridgebotics.ridgescout.utility.Colors.code_unscanned_color;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
@@ -37,7 +41,7 @@ public class CodeOverlayView extends View {
|
|||||||
|
|
||||||
private void init() {
|
private void init() {
|
||||||
paint = new Paint();
|
paint = new Paint();
|
||||||
paint.setColor(Color.YELLOW);
|
paint.setColor(code_selected_color);
|
||||||
paint.setStyle(Paint.Style.FILL);
|
paint.setStyle(Paint.Style.FILL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -69,12 +73,12 @@ public class CodeOverlayView extends View {
|
|||||||
|
|
||||||
final int num = barColors[i];
|
final int num = barColors[i];
|
||||||
|
|
||||||
int c = Color.RED;
|
int c = code_unscanned_color;
|
||||||
|
|
||||||
if(num == 2){
|
if(num == 2){
|
||||||
c = Color.GREEN;
|
c = code_scanned_color;
|
||||||
}else if(num == 1){
|
}else if(num == 1){
|
||||||
c = Color.YELLOW;
|
c = code_selected_color;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Paint p = new Paint();
|
final Paint p = new Paint();
|
||||||
|
|||||||
@@ -0,0 +1,80 @@
|
|||||||
|
package com.ridgebotics.ridgescout.utility;
|
||||||
|
|
||||||
|
import android.graphics.Color;
|
||||||
|
|
||||||
|
public class Colors {
|
||||||
|
// Lists and stuff
|
||||||
|
public static final int color_found = 0x7f00ff00;
|
||||||
|
public static final int color_rescout = 0x7f0000ff;
|
||||||
|
public static final int color_not_found = 0x7f7f0000;
|
||||||
|
|
||||||
|
|
||||||
|
public static final int background_color = 0x5000ff00;
|
||||||
|
public static final int unfocused_background_color = 0x50118811;
|
||||||
|
|
||||||
|
|
||||||
|
public static final int unsaved_color = 0x60ff0000;
|
||||||
|
public static final int saved_color = 0x6000ff00;
|
||||||
|
public static final int rescout_color = 0x600000ff;
|
||||||
|
|
||||||
|
|
||||||
|
// Data graphs
|
||||||
|
public static final int chart_background = 0xff252025;
|
||||||
|
public static final int chart_text = Color.WHITE;
|
||||||
|
|
||||||
|
public static final int[] checkbox_colors = {0x7f00ff00, 0x7f7f0000};
|
||||||
|
public static final int checkbox_data_color = Color.RED;;
|
||||||
|
public static final int checkbox_value_text_color = Color.BLACK;
|
||||||
|
|
||||||
|
public static final int dropdown_value_text_1 = Color.BLACK;
|
||||||
|
public static final int dropdown_value_text_2 = Color.RED;
|
||||||
|
|
||||||
|
public static final int fieldpos_data = Color.BLUE;
|
||||||
|
|
||||||
|
|
||||||
|
public static final int number_data = Color.BLUE;
|
||||||
|
|
||||||
|
|
||||||
|
public static final int slider_data = Color.BLUE;
|
||||||
|
|
||||||
|
|
||||||
|
public static final int tally_data = Color.BLUE;
|
||||||
|
|
||||||
|
|
||||||
|
public static final int text_data = Color.BLUE;
|
||||||
|
|
||||||
|
|
||||||
|
// Code scanner
|
||||||
|
public static final int code_scanned_color = Color.GREEN;
|
||||||
|
public static final int code_selected_color = Color.YELLOW;
|
||||||
|
public static final int code_unscanned_color = Color.RED;
|
||||||
|
|
||||||
|
// Toggle title
|
||||||
|
public static final int toggletitle_no_background = 0x00000000;
|
||||||
|
public static final int toggletitle_black_background = 0xff000000;
|
||||||
|
public static final int toggletitle_unselected = 0xffff0000;
|
||||||
|
// public static final int toggletitle_no_background = 0x00000000;
|
||||||
|
|
||||||
|
|
||||||
|
// Data fragment
|
||||||
|
public static final int datafragment_option_1 = 0xff509050;
|
||||||
|
public static final int datafragment_option_2 = 0xff307030;
|
||||||
|
|
||||||
|
|
||||||
|
// fileselector
|
||||||
|
public static final int fileselector_selected_color = 0x5000ff00;
|
||||||
|
public static final int fileselector_unselected_color = 0x5000ff00;
|
||||||
|
|
||||||
|
// 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_red = 0x50ff0000;
|
||||||
|
public static final int tba_blue = 0x500000ff;
|
||||||
|
public static final int tba_toggle_background = 0x30000000;
|
||||||
|
|
||||||
|
// Candlestick
|
||||||
|
public static final int candlestick_color = Color.GREEN;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user