worked on a lot of nothing
@@ -62,10 +62,6 @@ dependencies {
|
||||
implementation(libs.activity)
|
||||
implementation(libs.constraintlayout)
|
||||
|
||||
// FRC NetworkTables Dependencies (Kotlin DSL Syntax)
|
||||
implementation(libs.ntcore.java)
|
||||
implementation(libs.wpiutil.java)
|
||||
|
||||
// Google Sheets & Core API
|
||||
implementation("com.google.apis:google-api-services-sheets:v4-rev581-1.25.0") {
|
||||
exclude(group = "com.google.guava", module = "listenablefuture")
|
||||
|
||||
|
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 85 KiB |
@@ -1,208 +0,0 @@
|
||||
package com.example.generator;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.os.Bundle;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.Spinner;
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
|
||||
import com.google.android.material.button.MaterialButton;
|
||||
|
||||
public class ColorActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
EdgeToEdge.enable(this);
|
||||
setContentView(R.layout.activity_color);
|
||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
|
||||
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||
return insets;
|
||||
});
|
||||
|
||||
Spinner spinnerP = (Spinner) findViewById(R.id.ColorSelector);
|
||||
ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.colorOptions, android.R.layout.simple_spinner_item);
|
||||
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||
spinnerP.setAdapter(adapter);
|
||||
|
||||
Spinner spinnerS = (Spinner) findViewById(R.id.ColorSelector2nd);
|
||||
ArrayAdapter<CharSequence> adapter2 = ArrayAdapter.createFromResource(this, R.array.colorOptions2nd, android.R.layout.simple_spinner_item);
|
||||
adapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||
spinnerS.setAdapter(adapter2);
|
||||
|
||||
Button backButton = (Button) findViewById(R.id.button_back);
|
||||
Button nextButton = (Button) findViewById(R.id.button_next);
|
||||
backButton.setOnClickListener((v) -> {
|
||||
Intent intent = new Intent(this, EventsActivity.class);
|
||||
startActivity(intent);
|
||||
});
|
||||
nextButton.setOnClickListener((v) -> {
|
||||
Intent intent = new Intent(this, MakeStartingActivity.class);
|
||||
startActivity(intent);
|
||||
});
|
||||
|
||||
MaterialButton TeleExample1 = (MaterialButton) findViewById(R.id.button_tele_example);
|
||||
MaterialButton TeleExample2 = (MaterialButton) findViewById(R.id.button_tele_example2);
|
||||
MaterialButton AutoExample1 = (MaterialButton) findViewById(R.id.button_auto_example);
|
||||
MaterialButton AutoExample2 = (MaterialButton) findViewById(R.id.button_auto_example2);
|
||||
MaterialButton NavExample1 = (MaterialButton) findViewById(R.id.button_nav_example);
|
||||
MaterialButton NavExample2 = (MaterialButton) findViewById(R.id.button_nav_example2);
|
||||
RadioButton radioButton = (RadioButton) findViewById(R.id.radioButton);
|
||||
CheckBox checkBox = (CheckBox) findViewById(R.id.checkBox);
|
||||
|
||||
spinnerP.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> parentView, android.view.View selectedItemView, int position, long id) {
|
||||
String selectedItem = parentView.getItemAtPosition(position).toString();
|
||||
|
||||
int mainColorRes = 0;
|
||||
int bgTintRes = 0;
|
||||
String Color = "";
|
||||
|
||||
switch (selectedItem) {
|
||||
case "Primary Orange":
|
||||
Color = "Orange";
|
||||
mainColorRes = R.color.orangeMain;
|
||||
bgTintRes = R.color.orangeMain_bg;
|
||||
break;
|
||||
case "Primary Green":
|
||||
Color = "Green";
|
||||
mainColorRes = R.color.greenMain;
|
||||
bgTintRes = R.color.greenMain_bg;
|
||||
break;
|
||||
case "Primary Blue":
|
||||
Color = "Blue";
|
||||
mainColorRes = R.color.blueMain;
|
||||
bgTintRes = R.color.blueMain_bg;
|
||||
break;
|
||||
case "Primary Pink":
|
||||
Color = "Pink";
|
||||
mainColorRes = R.color.pinkMain;
|
||||
bgTintRes = R.color.pinkMain_bg;
|
||||
break;
|
||||
case "Primary Purple":
|
||||
Color = "Purple";
|
||||
mainColorRes = R.color.purpleMain;
|
||||
bgTintRes = R.color.purpleMain_bg;
|
||||
break;
|
||||
case "Primary Red":
|
||||
Color = "Red";
|
||||
mainColorRes = R.color.redMain;
|
||||
bgTintRes = R.color.redMain_bg;
|
||||
break;
|
||||
case "Primary Yellow":
|
||||
Color = "Yellow";
|
||||
mainColorRes = R.color.yellowMain;
|
||||
bgTintRes = R.color.yellowMain_bg;
|
||||
break;
|
||||
}
|
||||
|
||||
if (mainColorRes != 0) {
|
||||
ColorStateList mainColorStateList = ContextCompat.getColorStateList(ColorActivity.this, mainColorRes);
|
||||
ColorStateList bgTintStateList = ContextCompat.getColorStateList(ColorActivity.this, bgTintRes);
|
||||
int mainColorInt = ContextCompat.getColor(ColorActivity.this, mainColorRes);
|
||||
|
||||
EventsActivity.Data.setColorP(Color);
|
||||
|
||||
spinnerP.setBackgroundColor(mainColorInt);
|
||||
radioButton.setButtonTintList(mainColorStateList);
|
||||
checkBox.setButtonTintList(mainColorStateList);
|
||||
|
||||
TeleExample1.setStrokeColor(mainColorStateList);
|
||||
TeleExample1.setBackgroundTintList(bgTintStateList);
|
||||
|
||||
AutoExample2.setStrokeColor(mainColorStateList);
|
||||
AutoExample2.setBackgroundTintList(bgTintStateList);
|
||||
NavExample2.setBackgroundColor(mainColorInt);
|
||||
NavExample1.setBackgroundColor(mainColorInt);
|
||||
|
||||
backButton.setBackgroundColor(mainColorInt);
|
||||
nextButton.setBackgroundColor(mainColorInt);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> parentView) {}
|
||||
});
|
||||
|
||||
spinnerS.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> parentView, android.view.View selectedItemView, int position, long id) {
|
||||
String selectedItem = parentView.getItemAtPosition(position).toString();
|
||||
|
||||
int mainColorRes = 0;
|
||||
int bgTintRes = 0;
|
||||
String Color = "";
|
||||
|
||||
switch (selectedItem) {
|
||||
case "Secondary Orange":
|
||||
Color = "Orange";
|
||||
mainColorRes = R.color.orangeMain;
|
||||
bgTintRes = R.color.orangeMain_bg;
|
||||
break;
|
||||
case "Secondary Green":
|
||||
Color = "Green";
|
||||
mainColorRes = R.color.greenMain;
|
||||
bgTintRes = R.color.greenMain_bg;
|
||||
break;
|
||||
case "Secondary Blue":
|
||||
Color = "Blue";
|
||||
mainColorRes = R.color.blueMain;
|
||||
bgTintRes = R.color.blueMain_bg;
|
||||
break;
|
||||
case "Secondary Pink":
|
||||
Color = "Pink";
|
||||
mainColorRes = R.color.pinkMain;
|
||||
bgTintRes = R.color.pinkMain_bg;
|
||||
break;
|
||||
case "Secondary Purple":
|
||||
Color = "Purple";
|
||||
mainColorRes = R.color.purpleMain;
|
||||
bgTintRes = R.color.purpleMain_bg;
|
||||
break;
|
||||
case "Secondary Red":
|
||||
Color = "Red";
|
||||
mainColorRes = R.color.redMain;
|
||||
bgTintRes = R.color.redMain_bg;
|
||||
break;
|
||||
case "Secondary Yellow":
|
||||
Color = "Yellow";
|
||||
mainColorRes = R.color.yellowMain;
|
||||
bgTintRes = R.color.yellowMain_bg;
|
||||
break;
|
||||
}
|
||||
|
||||
if (mainColorRes != 0) {
|
||||
ColorStateList mainColorStateList = ContextCompat.getColorStateList(ColorActivity.this, mainColorRes);
|
||||
ColorStateList bgTintStateList = ContextCompat.getColorStateList(ColorActivity.this, bgTintRes);
|
||||
int mainColorInt = ContextCompat.getColor(ColorActivity.this, mainColorRes);
|
||||
|
||||
EventsActivity.Data.setColorS(Color);
|
||||
|
||||
spinnerS.setBackgroundColor(mainColorInt);
|
||||
|
||||
TeleExample2.setStrokeColor(mainColorStateList);
|
||||
TeleExample2.setBackgroundTintList(bgTintStateList);
|
||||
|
||||
AutoExample1.setStrokeColor(mainColorStateList);
|
||||
AutoExample1.setBackgroundTintList(bgTintStateList);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> parentView) {}
|
||||
});
|
||||
}
|
||||
}
|
||||
BIN
Generator/app/src/main/res/drawable/loop.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 14 KiB |
@@ -1,5 +1,5 @@
|
||||
<resources>
|
||||
<string name="app_name">Scouting App</string>
|
||||
<string name="app_name">ScoutConfig</string>
|
||||
<string name="submit">Submit</string>
|
||||
<string name="l0">No climb</string>
|
||||
<string name="Preload">Only shoot Preload?</string>
|
||||
|
||||