make teams select

This commit is contained in:
Tylr-J42 2025-03-07 13:12:56 -05:00
parent 7b226c40be
commit f052627099
81 changed files with 634 additions and 598 deletions

View File

@ -14,6 +14,17 @@
<option name="screenX" value="720" /> <option name="screenX" value="720" />
<option name="screenY" value="1280" /> <option name="screenY" value="1280" />
</PersistentDeviceSelectionData> </PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="OnePlus" />
<option name="codename" value="OP5552L1" />
<option name="id" value="OP5552L1" />
<option name="manufacturer" value="OnePlus" />
<option name="name" value="CPH2415" />
<option name="screenDensity" value="480" />
<option name="screenX" value="1080" />
<option name="screenY" value="2412" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData> <PersistentDeviceSelectionData>
<option name="api" value="34" /> <option name="api" value="34" />
<option name="brand" value="OPPO" /> <option name="brand" value="OPPO" />
@ -311,6 +322,17 @@
<option name="screenX" value="1600" /> <option name="screenX" value="1600" />
<option name="screenY" value="2560" /> <option name="screenY" value="2560" />
</PersistentDeviceSelectionData> </PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="gts9fe" />
<option name="id" value="gts9fe" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy Tab S9 FE 5G" />
<option name="screenDensity" value="280" />
<option name="screenX" value="1440" />
<option name="screenY" value="2304" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData> <PersistentDeviceSelectionData>
<option name="api" value="34" /> <option name="api" value="34" />
<option name="brand" value="google" /> <option name="brand" value="google" />

View File

@ -1,4 +1,4 @@
#Wed Mar 05 12:25:09 EST 2025 #Fri Mar 07 12:16:45 EST 2025
com.example.scoutingapp-main-33\:/drawable/ic_launcher_background.xml=C\:\\Users\\26jacquesty\\AndroidStudioProjects\\Reefscape-Scouting-App\\ScoutingApp\\app\\build\\intermediates\\merged_res\\debug\\mergeDebugResources\\drawable_ic_launcher_background.xml.flat com.example.scoutingapp-main-33\:/drawable/ic_launcher_background.xml=C\:\\Users\\26jacquesty\\AndroidStudioProjects\\Reefscape-Scouting-App\\ScoutingApp\\app\\build\\intermediates\\merged_res\\debug\\mergeDebugResources\\drawable_ic_launcher_background.xml.flat
com.example.scoutingapp-main-33\:/drawable/ic_launcher_foreground.xml=C\:\\Users\\26jacquesty\\AndroidStudioProjects\\Reefscape-Scouting-App\\ScoutingApp\\app\\build\\intermediates\\merged_res\\debug\\mergeDebugResources\\drawable_ic_launcher_foreground.xml.flat com.example.scoutingapp-main-33\:/drawable/ic_launcher_foreground.xml=C\:\\Users\\26jacquesty\\AndroidStudioProjects\\Reefscape-Scouting-App\\ScoutingApp\\app\\build\\intermediates\\merged_res\\debug\\mergeDebugResources\\drawable_ic_launcher_foreground.xml.flat
com.example.scoutingapp-main-33\:/drawable/loop.png=C\:\\Users\\26jacquesty\\AndroidStudioProjects\\Reefscape-Scouting-App\\ScoutingApp\\app\\build\\intermediates\\merged_res\\debug\\mergeDebugResources\\drawable_loop.png.flat com.example.scoutingapp-main-33\:/drawable/loop.png=C\:\\Users\\26jacquesty\\AndroidStudioProjects\\Reefscape-Scouting-App\\ScoutingApp\\app\\build\\intermediates\\merged_res\\debug\\mergeDebugResources\\drawable_loop.png.flat

View File

@ -1,4 +1,4 @@
#Wed Mar 05 12:25:09 EST 2025 #Fri Mar 07 12:16:45 EST 2025
com.example.scoutingapp-main-5\:/drawable/ic_launcher_background.xml=C\:\\Users\\26jacquesty\\AndroidStudioProjects\\Reefscape-Scouting-App\\ScoutingApp\\app\\build\\intermediates\\packaged_res\\debug\\packageDebugResources\\drawable\\ic_launcher_background.xml com.example.scoutingapp-main-5\:/drawable/ic_launcher_background.xml=C\:\\Users\\26jacquesty\\AndroidStudioProjects\\Reefscape-Scouting-App\\ScoutingApp\\app\\build\\intermediates\\packaged_res\\debug\\packageDebugResources\\drawable\\ic_launcher_background.xml
com.example.scoutingapp-main-5\:/drawable/ic_launcher_foreground.xml=C\:\\Users\\26jacquesty\\AndroidStudioProjects\\Reefscape-Scouting-App\\ScoutingApp\\app\\build\\intermediates\\packaged_res\\debug\\packageDebugResources\\drawable\\ic_launcher_foreground.xml com.example.scoutingapp-main-5\:/drawable/ic_launcher_foreground.xml=C\:\\Users\\26jacquesty\\AndroidStudioProjects\\Reefscape-Scouting-App\\ScoutingApp\\app\\build\\intermediates\\packaged_res\\debug\\packageDebugResources\\drawable\\ic_launcher_foreground.xml
com.example.scoutingapp-main-5\:/drawable/loop.png=C\:\\Users\\26jacquesty\\AndroidStudioProjects\\Reefscape-Scouting-App\\ScoutingApp\\app\\build\\intermediates\\packaged_res\\debug\\packageDebugResources\\drawable\\loop.png com.example.scoutingapp-main-5\:/drawable/loop.png=C\:\\Users\\26jacquesty\\AndroidStudioProjects\\Reefscape-Scouting-App\\ScoutingApp\\app\\build\\intermediates\\packaged_res\\debug\\packageDebugResources\\drawable\\loop.png

View File

@ -1,4 +1,4 @@
#Wed Mar 05 12:25:11 EST 2025 #Fri Mar 07 13:11:56 EST 2025
base.0=C\:\\Users\\26jacquesty\\AndroidStudioProjects\\Reefscape-Scouting-App\\ScoutingApp\\app\\build\\intermediates\\dex\\debug\\mergeExtDexDebug\\classes.dex base.0=C\:\\Users\\26jacquesty\\AndroidStudioProjects\\Reefscape-Scouting-App\\ScoutingApp\\app\\build\\intermediates\\dex\\debug\\mergeExtDexDebug\\classes.dex
base.1=C\:\\Users\\26jacquesty\\AndroidStudioProjects\\Reefscape-Scouting-App\\ScoutingApp\\app\\build\\intermediates\\dex\\debug\\mergeProjectDexDebug\\0\\classes.dex base.1=C\:\\Users\\26jacquesty\\AndroidStudioProjects\\Reefscape-Scouting-App\\ScoutingApp\\app\\build\\intermediates\\dex\\debug\\mergeProjectDexDebug\\0\\classes.dex
base.2=C\:\\Users\\26jacquesty\\AndroidStudioProjects\\Reefscape-Scouting-App\\ScoutingApp\\app\\build\\intermediates\\dex\\debug\\mergeProjectDexDebug\\4\\classes.dex base.2=C\:\\Users\\26jacquesty\\AndroidStudioProjects\\Reefscape-Scouting-App\\ScoutingApp\\app\\build\\intermediates\\dex\\debug\\mergeProjectDexDebug\\4\\classes.dex

View File

@ -7,11 +7,9 @@ drawable ic_launcher_foreground
drawable loop drawable loop
drawable screenshot_2025_01_16_115155 drawable screenshot_2025_01_16_115155
id ButtonNext id ButtonNext
id Event
id Match id Match
id Sheet id Sheet
id Submit_button id Submit_button
id TeamNumber
id blue1Button id blue1Button
id blue2Button id blue2Button
id blue3Button id blue3Button
@ -25,13 +23,14 @@ id button_Processor
id cb_CanLeave id cb_CanLeave
id cb_algaeReef id cb_algaeReef
id cb_coralPickup id cb_coralPickup
id editTextText
id getTeamsButton
id imageView2 id imageView2
id linearLayout id linearLayout
id main id main
id red1Button id red1Button
id red2Button id red2Button
id red3Button id red3Button
id textInputLayout
id textInputLayout2 id textInputLayout2
id textInputLayout3 id textInputLayout3
id textView2 id textView2

View File

@ -3,14 +3,14 @@
"merged": "C:\\Users\\26jacquesty\\.gradle\\daemon\\8.7\\com.example.scoutingapp-debug-31:\\drawable_loop.png.flat", "merged": "C:\\Users\\26jacquesty\\.gradle\\daemon\\8.7\\com.example.scoutingapp-debug-31:\\drawable_loop.png.flat",
"source": "C:\\Users\\26jacquesty\\.gradle\\daemon\\8.7\\com.example.scoutingapp-main-33:\\drawable\\loop.png" "source": "C:\\Users\\26jacquesty\\.gradle\\daemon\\8.7\\com.example.scoutingapp-main-33:\\drawable\\loop.png"
}, },
{
"merged": "C:\\Users\\26jacquesty\\.gradle\\daemon\\8.7\\com.example.scoutingapp-debug-31:\\mipmap-xxxhdpi_ic_launcher_round.webp.flat",
"source": "C:\\Users\\26jacquesty\\.gradle\\daemon\\8.7\\com.example.scoutingapp-main-33:\\mipmap-xxxhdpi\\ic_launcher_round.webp"
},
{ {
"merged": "C:\\Users\\26jacquesty\\.gradle\\daemon\\8.7\\com.example.scoutingapp-debug-31:\\mipmap-xxhdpi_ic_launcher_round.webp.flat", "merged": "C:\\Users\\26jacquesty\\.gradle\\daemon\\8.7\\com.example.scoutingapp-debug-31:\\mipmap-xxhdpi_ic_launcher_round.webp.flat",
"source": "C:\\Users\\26jacquesty\\.gradle\\daemon\\8.7\\com.example.scoutingapp-main-33:\\mipmap-xxhdpi\\ic_launcher_round.webp" "source": "C:\\Users\\26jacquesty\\.gradle\\daemon\\8.7\\com.example.scoutingapp-main-33:\\mipmap-xxhdpi\\ic_launcher_round.webp"
}, },
{
"merged": "C:\\Users\\26jacquesty\\.gradle\\daemon\\8.7\\com.example.scoutingapp-debug-31:\\mipmap-xxxhdpi_ic_launcher_round.webp.flat",
"source": "C:\\Users\\26jacquesty\\.gradle\\daemon\\8.7\\com.example.scoutingapp-main-33:\\mipmap-xxxhdpi\\ic_launcher_round.webp"
},
{ {
"merged": "C:\\Users\\26jacquesty\\.gradle\\daemon\\8.7\\com.example.scoutingapp-debug-31:\\xml_data_extraction_rules.xml.flat", "merged": "C:\\Users\\26jacquesty\\.gradle\\daemon\\8.7\\com.example.scoutingapp-debug-31:\\xml_data_extraction_rules.xml.flat",
"source": "C:\\Users\\26jacquesty\\.gradle\\daemon\\8.7\\com.example.scoutingapp-main-33:\\xml\\data_extraction_rules.xml" "source": "C:\\Users\\26jacquesty\\.gradle\\daemon\\8.7\\com.example.scoutingapp-main-33:\\xml\\data_extraction_rules.xml"

View File

@ -11,23 +11,8 @@
android:id="@+id/textInputLayout2" android:id="@+id/textInputLayout2"
android:layout_width="409dp" android:layout_width="409dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="1dp"
android:layout_marginTop="156dp"
android:layout_marginEnd="1dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textInputLayout"
android:layout_width="409dp"
android:layout_height="wrap_content"
android:layout_marginStart="1dp"
android:layout_marginEnd="1dp"
app:layout_constraintBottom_toTopOf="@+id/textInputLayout2"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
@ -39,54 +24,36 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="1dp" android:layout_marginStart="1dp"
android:layout_marginEnd="1dp" android:layout_marginEnd="1dp"
app:layout_constraintBottom_toTopOf="@+id/textInputLayout"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/TeamNumber"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Team number"
app:layout_constraintBottom_toTopOf="@+id/textInputLayout2"
app:layout_constraintTop_toBottomOf="@+id/textInputLayout3"
app:layout_constraintVertical_bias="0.902"
tools:layout_editor_absoluteX="0dp" />
<Button <Button
android:id="@+id/Submit_button" android:id="@+id/Submit_button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="188dp"
android:layout_marginBottom="40dp"
android:text="Submit" android:text="Submit"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent" />
app:layout_constraintStart_toStartOf="parent" />
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/Match" android:id="@+id/Match"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:hint="Match Number" android:hint="Match Number"
tools:layout_editor_absoluteX="33dp" app:layout_constraintTop_toBottomOf="@+id/editTextText"
tools:layout_editor_absoluteY="156dp" /> tools:layout_editor_absoluteX="-1dp" />
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/Event"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Event"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="300dp"
android:layout_marginTop="24dp" android:layout_marginTop="50dp"
android:orientation="horizontal" android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
@ -101,20 +68,20 @@
<RadioButton <RadioButton
android:id="@+id/red1Button" android:id="@+id/red1Button"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="100dp"
android:text="RadioButton" /> android:text="0" />
<RadioButton <RadioButton
android:id="@+id/red2Button" android:id="@+id/red2Button"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="100dp"
android:text="RadioButton" /> android:text="0" />
<RadioButton <RadioButton
android:id="@+id/red3Button" android:id="@+id/red3Button"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="100dp"
android:text="RadioButton" /> android:text="0" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
@ -126,30 +93,52 @@
<RadioButton <RadioButton
android:id="@+id/blue1Button" android:id="@+id/blue1Button"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="100dp"
android:text="RadioButton" /> android:text="0" />
<RadioButton <RadioButton
android:id="@+id/blue2Button" android:id="@+id/blue2Button"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="100dp"
android:text="RadioButton" /> android:text="0" />
<RadioButton <RadioButton
android:id="@+id/blue3Button" android:id="@+id/blue3Button"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="100dp"
android:text="RadioButton" /> android:text="0" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
<EditText
android:id="@+id/editTextText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:ems="10"
android:inputType="text"
android:text="Pine Tree District Event"
android:textAlignment="center"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/getTeamsButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Get Match"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/Match" />
<Button <Button
android:id="@+id/ButtonNext" android:id="@+id/ButtonNext"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Button" android:text="Next"
tools:layout_editor_absoluteX="107dp" tools:layout_editor_absoluteX="282dp"
tools:layout_editor_absoluteY="526dp" /> tools:layout_editor_absoluteY="641dp" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -3114,7 +3114,6 @@ int id BOTTOM_END 0x7f080001
int id BOTTOM_START 0x7f080002 int id BOTTOM_START 0x7f080002
int id ButtonNext 0x7f080003 int id ButtonNext 0x7f080003
int id CTRL 0x7f080004 int id CTRL 0x7f080004
int id Event 0x7f080005
int id FUNCTION 0x7f080006 int id FUNCTION 0x7f080006
int id META 0x7f080007 int id META 0x7f080007
int id Match 0x7f080008 int id Match 0x7f080008
@ -3128,7 +3127,6 @@ int id Sheet 0x7f08000f
int id Submit_button 0x7f080010 int id Submit_button 0x7f080010
int id TOP_END 0x7f080011 int id TOP_END 0x7f080011
int id TOP_START 0x7f080012 int id TOP_START 0x7f080012
int id TeamNumber 0x7f080013
int id above 0x7f080014 int id above 0x7f080014
int id accelerate 0x7f080015 int id accelerate 0x7f080015
int id accessibility_action_clickable_span 0x7f080016 int id accessibility_action_clickable_span 0x7f080016
@ -3302,6 +3300,7 @@ int id easeInOut 0x7f0800bd
int id easeOut 0x7f0800be int id easeOut 0x7f0800be
int id east 0x7f0800bf int id east 0x7f0800bf
int id edge 0x7f0800c0 int id edge 0x7f0800c0
int id editTextText 0x7f080218
int id edit_query 0x7f0800c1 int id edit_query 0x7f0800c1
int id edit_text_id 0x7f0800c2 int id edit_text_id 0x7f0800c2
int id elastic 0x7f0800c3 int id elastic 0x7f0800c3
@ -3331,6 +3330,7 @@ int id forever 0x7f0800da
int id fragment_container_view_tag 0x7f0800db int id fragment_container_view_tag 0x7f0800db
int id frost 0x7f0800dc int id frost 0x7f0800dc
int id fullscreen_header 0x7f0800dd int id fullscreen_header 0x7f0800dd
int id getTeamsButton 0x7f080219
int id ghost_view 0x7f0800de int id ghost_view 0x7f0800de
int id ghost_view_holder 0x7f0800df int id ghost_view_holder 0x7f0800df
int id gone 0x7f0800e0 int id gone 0x7f0800e0
@ -3583,7 +3583,6 @@ int id tag_window_insets_animation_callback 0x7f0801d6
int id text 0x7f0801d8 int id text 0x7f0801d8
int id text2 0x7f0801d9 int id text2 0x7f0801d9
int id textEnd 0x7f0801da int id textEnd 0x7f0801da
int id textInputLayout 0x7f0801db
int id textInputLayout2 0x7f0801dc int id textInputLayout2 0x7f0801dc
int id textInputLayout3 0x7f0801dd int id textInputLayout3 0x7f0801dd
int id textSpacerNoButtons 0x7f0801de int id textSpacerNoButtons 0x7f0801de

View File

@ -3115,7 +3115,6 @@ id BOTTOM_END
id BOTTOM_START id BOTTOM_START
id ButtonNext id ButtonNext
id CTRL id CTRL
id Event
id FUNCTION id FUNCTION
id META id META
id Match id Match
@ -3129,7 +3128,6 @@ id Sheet
id Submit_button id Submit_button
id TOP_END id TOP_END
id TOP_START id TOP_START
id TeamNumber
id above id above
id accelerate id accelerate
id accessibility_action_clickable_span id accessibility_action_clickable_span
@ -3303,6 +3301,7 @@ id easeInOut
id easeOut id easeOut
id east id east
id edge id edge
id editTextText
id edit_query id edit_query
id edit_text_id id edit_text_id
id elastic id elastic
@ -3332,6 +3331,7 @@ id forever
id fragment_container_view_tag id fragment_container_view_tag
id frost id frost
id fullscreen_header id fullscreen_header
id getTeamsButton
id ghost_view id ghost_view
id ghost_view_holder id ghost_view_holder
id gone id gone
@ -3584,7 +3584,6 @@ id tag_window_insets_animation_callback
id text id text
id text2 id text2
id textEnd id textEnd
id textInputLayout
id textInputLayout2 id textInputLayout2
id textInputLayout3 id textInputLayout3
id textSpacerNoButtons id textSpacerNoButtons

View File

@ -52,11 +52,11 @@ public class AutoActivity extends AppCompatActivity {
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom); v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
return insets; return insets;
}); });
Intent intentinput = getIntent(); Intent intentInput = getIntent();
eventString = intentinput.getStringExtra(MainActivity.Event_Key); eventString = intentInput.getStringExtra(MainActivity.eventKey);
matchString = intentinput.getStringExtra(MainActivity.Match_key); matchString = intentInput.getStringExtra(MainActivity.matchKey);
TeamString = intentinput.getStringExtra(MainActivity.Team_key); TeamString = intentInput.getStringExtra(MainActivity.teamKey);
startingPostionString = intentinput.getStringExtra(MainActivity.Postion_key); startingPostionString = intentInput.getStringExtra(MainActivity.postionKey);
l4Button = (Button) findViewById(R.id.button_L4); l4Button = (Button) findViewById(R.id.button_L4);
@ -146,7 +146,6 @@ public class AutoActivity extends AppCompatActivity {
intent.putExtra(Event_Key, eventString); intent.putExtra(Event_Key, eventString);
intent.putExtra(Match_key, matchString); intent.putExtra(Match_key, matchString);
intent.putExtra(Team_key, TeamString); intent.putExtra(Team_key, TeamString);
intent.putExtra(Postion_key, startingPostionString);
startActivity(intent); startActivity(intent);
return true; return true;
}); });

View File

@ -29,17 +29,15 @@ import java.net.URL;
import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.HttpsURLConnection;
public class MainActivity extends AppCompatActivity { public class MainActivity extends AppCompatActivity {
private EditText Match_number; private EditText matchNumber;
private EditText Event; private EditText team;
private EditText Team; private String matchNumberString;
private String Match_numberString; private String eventString = "2025melew";
private String EventString; private String teamString;
private String TeamString; public static final String postionKey = "POSTIONKEY";
private String startingPostionString; public static final String eventKey = "EVENTCONFIRM";
public static final String Postion_key = "POSTIONKEY"; public static final String matchKey = "MATCHCONFIRM";
public static final String Event_Key = "EVENTCONFIRM"; public static final String teamKey = "TEAMCONFIRM";
public static final String Match_key = "MATCHCONFIRM";
public static final String Team_key = "TEAMCONFIRM";
public String fein; public String fein;
InputStream stream; InputStream stream;
@ -55,19 +53,18 @@ public class MainActivity extends AppCompatActivity {
return insets; return insets;
}); });
Match_number = (EditText) findViewById(R.id.Match); matchNumber = (EditText) findViewById(R.id.Match);
// = (EditText) findViewById(R.id.Event); // = (EditText) findViewById(R.id.Event);
Button nextButton = (Button) findViewById(R.id.ButtonNext); Button nextButton = (Button) findViewById(R.id.ButtonNext);
nextButton.setOnClickListener(new View.OnClickListener() { nextButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
Match_numberString = Match_number.getText().toString(); matchNumberString = matchNumber.getText().toString();
EventString = Event.getText().toString(); teamString = team.getText().toString();
TeamString = Team.getText().toString(); if ((matchNumberString == null || matchNumberString.isEmpty()) ||
if ((Match_numberString == null || Match_numberString.isEmpty()) || (eventString == null || eventString.isEmpty()) ||
(EventString == null || EventString.isEmpty()) || (teamString == null || teamString.isEmpty())
(TeamString == null || TeamString.isEmpty()) || ){
(startingPostionString == null || startingPostionString.isEmpty())){
Toast.makeText(getApplicationContext(), "Fill in EVERYTHING", Toast.LENGTH_SHORT).show(); Toast.makeText(getApplicationContext(), "Fill in EVERYTHING", Toast.LENGTH_SHORT).show();
}else { }else {
makeIntent(); makeIntent();
@ -80,19 +77,38 @@ public class MainActivity extends AppCompatActivity {
public void onClick(View view) { public void onClick(View view) {
Submit submit = new Submit(); Submit submit = new Submit();
submit.uploadSheets(MainActivity.this, EventString+Match_number+TeamString+".csv"); submit.uploadSheets(MainActivity.this, eventString+matchNumberString+teamString+".csv");
} }
}); });
RadioButton r1Button = findViewById(R.id.red1Button);
RadioButton r2Button = findViewById(R.id.red2Button);
RadioButton r3Button = findViewById(R.id.red3Button);
RadioButton b1Button = findViewById(R.id.blue1Button);
RadioButton b2Button = findViewById(R.id.blue2Button);
RadioButton b3Button = findViewById(R.id.blue3Button);
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build(); StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy); StrictMode.setThreadPolicy(policy);
stream = getJSON("https://www.thebluealliance.com/api/v3/match/2025melew_qm" + Match_numberString);
Button getTeamsButton = (Button) findViewById(R.id.getTeamsButton);
getTeamsButton.setOnClickListener(new View.OnClickListener(){
public void onClick(View view){
if(matchNumber.getText().toString().isEmpty()){
Toast.makeText(getApplicationContext(), "Fill in EVERYTHING", Toast.LENGTH_SHORT).show();
}else{
try {
matchNumberString = matchNumber.getText().toString();
stream = getJSON("https://www.thebluealliance.com/api/v3/match/2024melew_qm" + matchNumberString);
JsonElement jsonElement = JsonParser.parseReader(new InputStreamReader(stream)); JsonElement jsonElement = JsonParser.parseReader(new InputStreamReader(stream));
JsonObject teamsJSON = jsonElement.getAsJsonObject(); JsonObject teamsJSON = jsonElement.getAsJsonObject();
JsonArray blueTeamsArray = teamsJSON.get("alliances") JsonArray blueTeamsArray = teamsJSON.get("alliances")
.getAsJsonObject().get("blue"). .getAsJsonObject().get("blue").
getAsJsonObject().get("team_keys").getAsJsonArray(); getAsJsonObject().get("team_keys").getAsJsonArray();
Log.d("test", "why so serious");
//.asList() //.asList()
//.get(0). //.get(0).
//toString(); //toString();
@ -117,19 +133,21 @@ public class MainActivity extends AppCompatActivity {
String red3 = redTeamsArray.get(2).getAsString(); String red3 = redTeamsArray.get(2).getAsString();
red3 = red3.substring(3); red3 = red3.substring(3);
RadioButton r1Button = findViewById(R.id.red1Button);
r1Button.setText(red1); r1Button.setText(red1);
RadioButton r2Button = findViewById(R.id.red2Button);
r2Button.setText(red2); r2Button.setText(red2);
RadioButton r3Button = findViewById(R.id.red3Button);
r3Button.setText(red3); r3Button.setText(red3);
RadioButton b1Button = findViewById(R.id.blue1Button);
b1Button.setText(blue1); b1Button.setText(blue1);
RadioButton b2Button = findViewById(R.id.blue2Button);
b2Button.setText(blue2); b2Button.setText(blue2);
RadioButton b3Button = findViewById(R.id.blue3Button);
b3Button.setText(blue3); b3Button.setText(blue3);
}
catch(Exception e){
Toast.makeText(getApplicationContext(), "Fill in EVERYTHING", Toast.LENGTH_SHORT).show();
}
}
}
});
r1Button.setOnClickListener(new View.OnClickListener() { r1Button.setOnClickListener(new View.OnClickListener() {
@Override @Override
@ -173,6 +191,8 @@ public class MainActivity extends AppCompatActivity {
b1Button.setChecked(true); b1Button.setChecked(true);
b2Button.setChecked(false); b2Button.setChecked(false);
b3Button.setChecked(false); b3Button.setChecked(false);
teamString = b1Button.getText().toString();
} }
}); });
b2Button.setOnClickListener(new View.OnClickListener() { b2Button.setOnClickListener(new View.OnClickListener() {
@ -214,8 +234,6 @@ public class MainActivity extends AppCompatActivity {
connection.setUseCaches(false); connection.setUseCaches(false);
stream = (InputStream)connection.getInputStream(); stream = (InputStream)connection.getInputStream();
//Log.d("test", "after assigned stream");
//Log.d("test", stream.toString());
} }
catch (Exception e){ catch (Exception e){
Log.d("test", "inside catch"); Log.d("test", "inside catch");
@ -227,10 +245,9 @@ public class MainActivity extends AppCompatActivity {
private void makeIntent() private void makeIntent()
{ {
Intent intent = new Intent(this, AutoActivity.class); Intent intent = new Intent(this, AutoActivity.class);
intent.putExtra(Event_Key, EventString); intent.putExtra(eventKey, eventString);
intent.putExtra(Match_key, Match_numberString); intent.putExtra(matchKey, matchNumberString);
intent.putExtra(Team_key, TeamString); intent.putExtra(teamKey, teamString);
intent.putExtra(Postion_key, startingPostionString);
startActivity(intent); startActivity(intent);
} }
} }

View File

@ -30,15 +30,16 @@
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<Button <Button
android:id="@+id/Submit_button" android:id="@+id/Submit_button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="188dp"
android:layout_marginBottom="40dp"
android:text="Submit" android:text="Submit"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent" />
app:layout_constraintStart_toStartOf="parent" />
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/Match" android:id="@+id/Match"
@ -52,7 +53,7 @@
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="300dp" android:layout_height="300dp"
android:layout_marginTop="24dp" android:layout_marginTop="50dp"
android:orientation="horizontal" android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
@ -68,19 +69,19 @@
android:id="@+id/red1Button" android:id="@+id/red1Button"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="100dp" android:layout_height="100dp"
android:text="RadioButton" /> android:text="0" />
<RadioButton <RadioButton
android:id="@+id/red2Button" android:id="@+id/red2Button"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="100dp" android:layout_height="100dp"
android:text="RadioButton" /> android:text="0" />
<RadioButton <RadioButton
android:id="@+id/red3Button" android:id="@+id/red3Button"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="100dp" android:layout_height="100dp"
android:text="RadioButton" /> android:text="0" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
@ -93,31 +94,23 @@
android:id="@+id/blue1Button" android:id="@+id/blue1Button"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="100dp" android:layout_height="100dp"
android:text="RadioButton" /> android:text="0" />
<RadioButton <RadioButton
android:id="@+id/blue2Button" android:id="@+id/blue2Button"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="100dp" android:layout_height="100dp"
android:text="RadioButton" /> android:text="0" />
<RadioButton <RadioButton
android:id="@+id/blue3Button" android:id="@+id/blue3Button"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="100dp" android:layout_height="100dp"
android:text="RadioButton" /> android:text="0" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
<Button
android:id="@+id/ButtonNext"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button"
tools:layout_editor_absoluteX="107dp"
tools:layout_editor_absoluteY="526dp" />
<EditText <EditText
android:id="@+id/editTextText" android:id="@+id/editTextText"
android:layout_width="0dp" android:layout_width="0dp"
@ -131,4 +124,21 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/getTeamsButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Get Match"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/Match" />
<Button
android:id="@+id/ButtonNext"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Next"
tools:layout_editor_absoluteX="282dp"
tools:layout_editor_absoluteY="641dp" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>