Initial commit
59
app/.gitignore
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
#built application files
|
||||
*.apk
|
||||
*.ap_
|
||||
|
||||
# files for the dex VM
|
||||
*.dex
|
||||
|
||||
# Java class files
|
||||
*.class
|
||||
|
||||
# generated files
|
||||
bin/
|
||||
gen/
|
||||
|
||||
# Local configuration file (sdk path, etc)
|
||||
local.properties
|
||||
|
||||
# Windows thumbnail db
|
||||
Thumbs.db
|
||||
|
||||
# OSX files
|
||||
.DS_Store
|
||||
|
||||
# Android Studio
|
||||
*.iml
|
||||
.idea
|
||||
#.idea/workspace.xml - remove # and delete .idea if it better suit your needs.
|
||||
.gradle
|
||||
build/
|
||||
.navigation
|
||||
captures/
|
||||
output.json
|
||||
|
||||
#NDK
|
||||
obj/
|
||||
.externalNativeBuild
|
||||
Since Android Studio 2.2 and up to 3.0, new projects are created with this gitignore file:
|
||||
|
||||
*.iml
|
||||
.gradle
|
||||
/local.properties
|
||||
/.idea/workspace.xml
|
||||
/.idea/libraries
|
||||
.DS_Store
|
||||
/build
|
||||
/captures
|
||||
.externalNativeBuild
|
||||
Deprecated - for older project format, add this section to your gitignore file:
|
||||
|
||||
|
||||
/*/out
|
||||
/*/*/build
|
||||
/*/*/production
|
||||
*.iws
|
||||
*.ipr
|
||||
*~
|
||||
*.swp
|
||||
|
||||
Settings.java
|
||||
35
app/build.gradle
Normal file
@@ -0,0 +1,35 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 26
|
||||
defaultConfig {
|
||||
applicationId "com.example.vande.scouting2018"
|
||||
minSdkVersion 17
|
||||
targetSdkVersion 26
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
namespace 'com.example.ncgears.scouting'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
|
||||
exclude group: 'com.android.support', module: 'support-annotations'
|
||||
})
|
||||
implementation 'com.android.support:appcompat-v7:26.1.0'
|
||||
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
|
||||
implementation 'com.jakewharton:butterknife:8.7.0'
|
||||
annotationProcessor 'com.jakewharton:butterknife-compiler:8.7.0'
|
||||
implementation 'com.android.support:design:26.1.0'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
implementation files('libs/javacsv.jar')
|
||||
|
||||
}
|
||||
BIN
app/libs/javacsv.jar
Normal file
21
app/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
41
app/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity android:name=".MainActivity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name=".ScouterInitialsActivity" />
|
||||
<activity android:name=".AutonActivity" />
|
||||
<activity android:name=".TeleopActivity" />
|
||||
<activity android:name=".PitActivity" />
|
||||
<activity android:name=".SendDataActivity" />
|
||||
|
||||
<provider
|
||||
android:name="android.support.v4.content.FileProvider"
|
||||
android:authorities="${applicationId}.provider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true">
|
||||
<meta-data
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/provider_paths" />
|
||||
</provider>
|
||||
</application>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
|
||||
</manifest>
|
||||
BIN
app/src/main/ic_launcher-web.png
Normal file
|
After Width: | Height: | Size: 180 KiB |
@@ -0,0 +1,525 @@
|
||||
/*
|
||||
|
||||
*************** Code Designed by Team 107 Team Robotics *********************
|
||||
*************** Edited for Team 1918 By Nate and Ken *********************
|
||||
|
||||
|
||||
*/
|
||||
|
||||
package com.example.ncgears.scouting;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.design.widget.TextInputEditText;
|
||||
import android.support.design.widget.TextInputLayout;
|
||||
import android.support.v4.app.ActivityCompat;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.example.ncgears.scouting.data.TeamsDbHelper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import utils.FormatStringUtils;
|
||||
import utils.StringUtils;
|
||||
import utils.ViewUtils;
|
||||
|
||||
public class AutonActivity extends AppCompatActivity implements View.OnKeyListener {
|
||||
|
||||
/*This area sets and binds all of the variables that we will use in the auton activity*/
|
||||
public static String AUTON_STRING_EXTRA = "auton_extra";
|
||||
|
||||
/* These are the names of the match number and team number extras that will be passed into teleop */
|
||||
public static final String MATCH_STRING_EXTRA = "match_extra";
|
||||
public static final String TEAMNUMBER_STRING_EXTRA = "teamnumber_extra";
|
||||
|
||||
|
||||
@BindView(R.id.team_number_spinner)
|
||||
public Spinner TeamNumberInputLayout;
|
||||
|
||||
@BindView(R.id.auto_high_attempt_input_layout)
|
||||
public TextInputLayout AutoHighAttemptInputLayout;
|
||||
|
||||
@BindView(R.id.auto_high_attempt_input)
|
||||
public TextInputEditText AutoHighAttemptInput;
|
||||
|
||||
@BindView(R.id.auto_high_made_layout)
|
||||
public TextInputLayout AutoHighMadeLayout;
|
||||
|
||||
@BindView(R.id.auto_high_made_input)
|
||||
public TextInputEditText AutoHighMadeInput;
|
||||
|
||||
@BindView(R.id.auto_low_attempt_input_layout)
|
||||
public TextInputLayout AutoLowAttemptInputLayout;
|
||||
|
||||
@BindView(R.id.auto_low_attempt_input)
|
||||
public TextInputEditText AutoLowAttemptInput;
|
||||
|
||||
@BindView(R.id.auto_low_made_layout)
|
||||
public TextInputLayout AutoLowMadeLayout;
|
||||
|
||||
@BindView(R.id.auto_low_made_input)
|
||||
public TextInputEditText AutoLowMadeInput;
|
||||
|
||||
//Trap Starts
|
||||
@BindView(R.id.auto_trap_attempt_input_layout)
|
||||
public TextInputLayout AutoTrapAttemptInputLayout;
|
||||
|
||||
@BindView(R.id.auto_trap_attempt_input)
|
||||
public TextInputEditText AutoTrapAttemptInput;
|
||||
|
||||
@BindView(R.id.auto_trap_made_layout)
|
||||
public TextInputLayout AutoTrapMadeLayout;
|
||||
|
||||
@BindView(R.id.auto_trap_made_input)
|
||||
public TextInputEditText AutoTrapMadeInput;
|
||||
//Trap Ends
|
||||
@BindView(R.id.matchNumber_input_layout)
|
||||
public TextInputLayout matchNumberInputLayout;
|
||||
|
||||
@BindView(R.id.matchNumber_input)
|
||||
public EditText matchNumberInput;
|
||||
|
||||
@BindView(R.id.starting_location)
|
||||
public Spinner startingLocation;
|
||||
|
||||
@BindView(R.id.auto_initiation_line)
|
||||
RadioGroup autoInitiationLine;
|
||||
|
||||
@BindView(R.id.next_button)
|
||||
public Button nextButton;
|
||||
|
||||
int HighAttempt = 0;
|
||||
int HighMissed =0;
|
||||
int HighMade = 0;
|
||||
int LowAttempt = 0;
|
||||
int LowMissed = 0;
|
||||
int LowMade = 0;
|
||||
int TrapAttempt = 0;
|
||||
int TrapMade = 0;
|
||||
int TrapMissed = 0;
|
||||
|
||||
public ArrayList<String> team_numbers = new ArrayList<>();
|
||||
private ArrayList<CharSequence> autonDataStringList;
|
||||
public static final int REQUEST_CODE = 1;
|
||||
|
||||
|
||||
/*When this activity is first called,
|
||||
*we will call the activity_auton layout so we can display
|
||||
*the user interface
|
||||
*/
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
TeamsDbHelper mDbHelper = new TeamsDbHelper(this);
|
||||
SQLiteDatabase db = mDbHelper.getReadableDatabase();
|
||||
|
||||
setContentView(R.layout.activity_auton);
|
||||
ButterKnife.bind(this);
|
||||
autonDataStringList = new ArrayList<>();
|
||||
team_numbers = TeamsDbHelper.getTeamNumbers(db);
|
||||
|
||||
checkForPermissions();
|
||||
|
||||
AutoHighAttemptInput.setText("" + HighMissed);
|
||||
AutoHighMadeInput.setText("" + HighMade);
|
||||
AutoLowAttemptInput.setText("" + LowMissed);
|
||||
AutoLowMadeInput.setText("" + LowMade);
|
||||
AutoTrapAttemptInput.setText("" + TrapMissed);
|
||||
AutoTrapMadeInput.setText("" + TrapMade);
|
||||
|
||||
|
||||
// --- Team Numbers spinner ---
|
||||
|
||||
Spinner teamnumberspinner = (Spinner) findViewById(R.id.team_number_spinner);
|
||||
// Create an ArrayAdapter using the string array and a default spinner layout
|
||||
ArrayAdapter teamnumberadapter = new ArrayAdapter<String>(AutonActivity.this,
|
||||
android.R.layout.simple_spinner_dropdown_item, team_numbers);
|
||||
// Specify the layout to use when the list of choices appears
|
||||
teamnumberadapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||
// Apply the adapter to the spinner
|
||||
teamnumberspinner.setAdapter(teamnumberadapter);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*If this activity is resumed from a paused state the data
|
||||
*will be set to what they previously were set to
|
||||
*/
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
|
||||
autonDataStringList.clear();
|
||||
|
||||
TeamNumberInputLayout.setOnKeyListener(this);
|
||||
AutoHighAttemptInputLayout.setOnKeyListener(this);
|
||||
AutoHighMadeLayout.setOnKeyListener(this);
|
||||
AutoLowAttemptInputLayout.setOnKeyListener(this);
|
||||
AutoLowMadeLayout.setOnKeyListener(this);
|
||||
AutoTrapAttemptInputLayout.setOnKeyListener(this);
|
||||
AutoTrapMadeLayout.setOnKeyListener(this);
|
||||
matchNumberInput.setOnKeyListener(this);
|
||||
startingLocation.setOnKeyListener(this);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*If this activity enters a paused state the data will be set to null*/
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
|
||||
TeamNumberInputLayout.setOnKeyListener(null);
|
||||
AutoHighAttemptInputLayout.setOnKeyListener(null);
|
||||
AutoHighMadeLayout.setOnKeyListener(null);
|
||||
AutoLowAttemptInputLayout.setOnKeyListener(null);
|
||||
AutoLowMadeLayout.setOnKeyListener(null);
|
||||
AutoTrapAttemptInputLayout.setOnKeyListener(null);
|
||||
AutoTrapMadeLayout.setOnKeyListener(null);
|
||||
matchNumberInput.setOnKeyListener(null);
|
||||
startingLocation.setOnKeyListener(null);
|
||||
|
||||
}
|
||||
|
||||
/* This method will display the options menu when the icon is pressed
|
||||
* and this will inflate the menu options for the user to choose
|
||||
*/
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
getMenuInflater().inflate(R.menu.main_menu, menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
/*This method will launch the correct activity
|
||||
*based on the menu option user presses
|
||||
*/
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case R.id.main_activity:
|
||||
startActivity(new Intent(this, MainActivity.class));
|
||||
return true;
|
||||
case R.id.send_data:
|
||||
startActivity(new Intent(this, SendDataActivity.class));
|
||||
return true;
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*This method will look at all of the text/number input fields and set error
|
||||
*for validation of data entry
|
||||
*/
|
||||
@Override
|
||||
public boolean onKey(View v, int keyCode, KeyEvent event) {
|
||||
if (keyCode != KeyEvent.KEYCODE_SPACE && keyCode != KeyEvent.KEYCODE_TAB) {
|
||||
TextInputEditText inputEditText = (TextInputEditText) v;
|
||||
|
||||
if (inputEditText != null) {
|
||||
|
||||
switch (inputEditText.getId()) {
|
||||
|
||||
|
||||
case R.id.matchNumber_input:
|
||||
matchNumberInputLayout.setError(null);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/*This method takes place when the Show teleop button is pressed
|
||||
*This will first check if the text fields are empty and highlight
|
||||
* The area not completed as well as put that text input as the focus
|
||||
* to the user in the app. If everything passes by being filled in,
|
||||
* The value of the radio buttons will be obtained.
|
||||
* Then all of the values of this activity are added to the autonDataStringList
|
||||
* delimited by a comma. This method will then launch the teleop activity while sending
|
||||
* over our list of data. A request on result is requested so we can clear this aplication
|
||||
* after the teleop activity closes
|
||||
*/
|
||||
public void onShowTeleop(View view) {
|
||||
boolean allInputsPassed = false;
|
||||
|
||||
final RadioButton autoInitiationLineRadioBtn = findViewById(autoInitiationLine.getCheckedRadioButtonId());
|
||||
|
||||
if (TeamNumberInputLayout.getSelectedItem().toString().equals("Select Team Number")) {
|
||||
setSpinnerError(TeamNumberInputLayout, "Select a Team Number.");
|
||||
ViewUtils.requestFocus(TeamNumberInputLayout, this);
|
||||
} else if (StringUtils.isEmptyOrNull(getTextInputLayoutString(matchNumberInputLayout)) || Integer.valueOf(getTextInputLayoutString(matchNumberInputLayout)) == 0 || Integer.valueOf(getTextInputLayoutString(matchNumberInputLayout)) >= 150) {
|
||||
matchNumberInput.setText("");
|
||||
matchNumberInputLayout.setError(getText(R.string.matchNumberError));
|
||||
ViewUtils.requestFocus(matchNumberInputLayout, this);
|
||||
} else {
|
||||
allInputsPassed = true;
|
||||
}
|
||||
|
||||
if (!allInputsPassed) {
|
||||
return;
|
||||
}
|
||||
|
||||
autonDataStringList.add(TeamNumberInputLayout.getSelectedItem().toString());
|
||||
autonDataStringList.add(getTextInputLayoutString(matchNumberInputLayout));
|
||||
// autonDataStringList.add(startingLocation.getSelectedItem().toString());
|
||||
autonDataStringList.add(getTextInputLayoutString(AutoHighAttemptInputLayout));
|
||||
autonDataStringList.add(getTextInputLayoutString(AutoHighMadeLayout));
|
||||
autonDataStringList.add(getTextInputLayoutString(AutoLowAttemptInputLayout));
|
||||
autonDataStringList.add(getTextInputLayoutString(AutoLowMadeLayout));
|
||||
autonDataStringList.add(getTextInputLayoutString(AutoTrapAttemptInputLayout));
|
||||
autonDataStringList.add(getTextInputLayoutString(AutoTrapMadeLayout));
|
||||
autonDataStringList.add(autoInitiationLineRadioBtn.getText().toString());
|
||||
|
||||
|
||||
|
||||
|
||||
//autonDataStringList.add(playStyle.getSelectedItem().toString());
|
||||
|
||||
final Intent intent = new Intent(this, TeleopActivity.class);
|
||||
intent.putExtra(AUTON_STRING_EXTRA, FormatStringUtils.addDelimiter(autonDataStringList, "|"));
|
||||
intent.putExtra(MATCH_STRING_EXTRA, getTextInputLayoutString(matchNumberInputLayout));
|
||||
intent.putExtra(TEAMNUMBER_STRING_EXTRA, TeamNumberInputLayout.getSelectedItem().toString());
|
||||
|
||||
startActivityForResult(intent, REQUEST_CODE);
|
||||
|
||||
|
||||
matchNumberInputLayout.setError(null);
|
||||
|
||||
matchNumberInput.requestFocus();
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*This method will check for the result code from the teleop activity
|
||||
*so we can clear the data before the next match scouting starts
|
||||
*/
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
try {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
|
||||
if (requestCode == REQUEST_CODE && resultCode == RESULT_OK) {
|
||||
clearData();
|
||||
finish();
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
Toast.makeText(this, ex.toString(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
/*This method will clear all of the text entry fields as well
|
||||
* as reset the checkboxes and reset the radio buttons to their default*/
|
||||
public void clearData() {
|
||||
TeamNumberInputLayout.setSelection(0);
|
||||
matchNumberInput.setText("");
|
||||
startingLocation.setSelection(0);
|
||||
AutoHighAttemptInput.setText("" + HighMissed);
|
||||
AutoHighMadeInput.setText("" + HighMade);
|
||||
AutoLowAttemptInput.setText("" + LowMissed);
|
||||
AutoLowMadeInput.setText("" + LowMade);
|
||||
AutoTrapAttemptInput.setText("" + TrapAttempt);
|
||||
AutoTrapMadeInput.setText("" + TrapMade);
|
||||
HighAttempt = 0;
|
||||
HighMissed =0;
|
||||
HighMade = 0;
|
||||
LowAttempt = 0;
|
||||
LowMissed = 0;
|
||||
LowMade = 0;
|
||||
TrapAttempt = 0;
|
||||
TrapMissed = 0;
|
||||
TrapMade = 0;
|
||||
autoInitiationLine.check(R.id.AutoInitiationLine_yes);
|
||||
displayAutoHighAttemptInput(HighMissed);
|
||||
displayAutoHighMadeInput(HighMade);
|
||||
displayAutoLowAttemptInput(LowMissed);
|
||||
displayAutoLowMadeInput(LowMade);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void setSpinnerError(Spinner spinner, String error) {
|
||||
View selectedView = spinner.getSelectedView();
|
||||
if (selectedView instanceof TextView) {
|
||||
spinner.requestFocus();
|
||||
TextView selectedTextView = (TextView) selectedView;
|
||||
selectedTextView.setError("error");
|
||||
selectedTextView.setTextColor(Color.RED);
|
||||
selectedTextView.setText(error);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* This method will change the text entered into the app into a string if it is not already*/
|
||||
private String getTextInputLayoutString(@NonNull TextInputLayout textInputLayout) {
|
||||
final EditText editText = textInputLayout.getEditText();
|
||||
return editText != null && editText.getText() != null ? editText.getText().toString() : "";
|
||||
}
|
||||
|
||||
private void checkForPermissions() {
|
||||
int writePermission = ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE);
|
||||
|
||||
if (writePermission != PackageManager.PERMISSION_GRANTED) {
|
||||
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 1);
|
||||
}
|
||||
}
|
||||
|
||||
public void decreaseAutoHighAttemptInput(View view) {
|
||||
if (HighMissed != 0) {
|
||||
HighMissed -= 1;
|
||||
HighAttempt -=1;
|
||||
|
||||
displayAutoHighAttemptInput(HighMissed);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void increaseAutoHighAttemptInput(View view) {
|
||||
if (HighMissed <= 800) {
|
||||
HighMissed += 1;
|
||||
HighAttempt +=1;
|
||||
displayAutoHighAttemptInput(HighMissed);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void displayAutoHighAttemptInput(int number) {
|
||||
|
||||
AutoHighAttemptInput.setText("" + number);
|
||||
}
|
||||
|
||||
public void decreaseAutoHighMadeInput(View view) {
|
||||
if (HighMade != 0) {
|
||||
HighMade -= 1;
|
||||
HighAttempt -= 1;
|
||||
displayAutoHighMadeInput(HighMade);
|
||||
}
|
||||
}
|
||||
|
||||
public void increaseAutoHightMadeInput(View view) {
|
||||
if (HighMade <= 800) {
|
||||
HighMade +=1;
|
||||
HighAttempt += 1;
|
||||
displayAutoHighMadeInput(HighMade);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void displayAutoHighMadeInput(int number) {
|
||||
|
||||
AutoHighMadeInput.setText("" + number);
|
||||
}
|
||||
|
||||
public void decreaseAutoLowAttemptInput(View view) {
|
||||
if (LowMissed != 0) {
|
||||
LowMissed -= 1;
|
||||
LowAttempt -=1;
|
||||
|
||||
displayAutoLowAttemptInput(LowMissed);
|
||||
}
|
||||
}
|
||||
|
||||
public void increaseAutoLowAttemptInput(View view) {
|
||||
if (LowMissed <= 800) {
|
||||
LowMissed += 1;
|
||||
LowAttempt += 1;
|
||||
displayAutoLowAttemptInput(LowMissed);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void displayAutoLowAttemptInput(int number) {
|
||||
|
||||
AutoLowAttemptInput.setText("" + number);
|
||||
}
|
||||
|
||||
public void decreaseAutoLowMadeInput(View view) {
|
||||
if (LowMade != 0) {
|
||||
LowMade -= 1;
|
||||
LowAttempt -=1;
|
||||
displayAutoLowMadeInput(LowMade);
|
||||
}
|
||||
}
|
||||
|
||||
public void increaseAutoLowMadeInput(View view) {
|
||||
if (LowMade <= 800) {
|
||||
LowMade += 1;
|
||||
LowAttempt +=1;
|
||||
displayAutoLowMadeInput(LowMade);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void displayAutoLowMadeInput(int number) {
|
||||
|
||||
AutoLowMadeInput.setText("" + number);
|
||||
}
|
||||
public void decreaseAutoTrapAttemptInput(View view) {
|
||||
if (TrapMissed != 0) {
|
||||
TrapMissed -= 1;
|
||||
TrapAttempt -=1;
|
||||
|
||||
displayAutoTrapAttemptInput(TrapMissed);
|
||||
}
|
||||
}
|
||||
public void increaseAutoTrapAttemptInput(View view) {
|
||||
if (TrapMissed <= 800) {
|
||||
TrapMissed += 1;
|
||||
TrapAttempt += 1;
|
||||
displayAutoTrapAttemptInput(TrapMissed);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void decreaseAutoTrapMadeInput(View view) {
|
||||
if (TrapMade != 0) {
|
||||
TrapMade -= 1;
|
||||
TrapAttempt -=1;
|
||||
displayAutoTrapMadeInput(TrapMade);
|
||||
}
|
||||
}
|
||||
|
||||
public void increaseAutoTrapMadeInput(View view) {
|
||||
if (TrapMade <= 800) {
|
||||
TrapMade += 1;
|
||||
TrapAttempt +=1;
|
||||
displayAutoTrapMadeInput(TrapMade);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
private void displayAutoTrapMadeInput(int number) {
|
||||
|
||||
AutoTrapMadeInput.setText("" + number);
|
||||
}
|
||||
private void displayAutoTrapAttemptInput(int number) {
|
||||
|
||||
AutoTrapAttemptInput.setText("" + number);
|
||||
}
|
||||
}
|
||||
|
||||
154
app/src/main/java/com/example/ncgears/scouting/MainActivity.java
Normal file
@@ -0,0 +1,154 @@
|
||||
/*
|
||||
|
||||
*************** Code Designed by Team 107 Team Robotics *********************
|
||||
*************** Edited for Team 1918 By Nate and Ken *********************
|
||||
|
||||
|
||||
*/
|
||||
|
||||
package com.example.ncgears.scouting;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.inputmethodservice.Keyboard;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
import android.os.Bundle;
|
||||
import android.support.design.widget.TextInputEditText;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.example.ncgears.scouting.customToast.CustomToast;
|
||||
import com.example.ncgears.scouting.data.GetJasonData;
|
||||
import com.example.ncgears.scouting.data.TeamsContract.TeamEntry;
|
||||
import com.example.ncgears.scouting.data.TeamsDbHelper;
|
||||
|
||||
import org.json.JSONArray;
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
public class MainActivity extends AppCompatActivity implements View.OnKeyListener {
|
||||
|
||||
|
||||
public static TextView data;
|
||||
public static String TeamsList = "No teams loaded";
|
||||
public static String postData;
|
||||
|
||||
SQLiteDatabase db;
|
||||
|
||||
public ArrayList<String> teams = new ArrayList<>();
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
setContentView(R.layout.activity_main);
|
||||
ButterKnife.bind(this);
|
||||
|
||||
// set up Database object
|
||||
TeamsDbHelper mDbHelper = new TeamsDbHelper(this);
|
||||
db = mDbHelper.getWritableDatabase();
|
||||
|
||||
teams = TeamsDbHelper.getTeams(db);
|
||||
|
||||
if (!teams.isEmpty()){
|
||||
TeamsList = "";
|
||||
for(int i =0; i < teams.size(); i++){
|
||||
|
||||
TeamsList = TeamsList + teams.get(i) + "\n";
|
||||
}
|
||||
}
|
||||
|
||||
data = findViewById(R.id.TeamsList);
|
||||
data.setText(TeamsList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
getMenuInflater().inflate(R.menu.main_menu, menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case R.id.main_activity:
|
||||
startActivity(new Intent(this, MainActivity.class));
|
||||
return true;
|
||||
case R.id.send_data:
|
||||
startActivity(new Intent(this, SendDataActivity.class));
|
||||
return true;
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKey(View v, int keyCode, KeyEvent event) {
|
||||
if (keyCode != KeyEvent.KEYCODE_SPACE && keyCode != KeyEvent.KEYCODE_TAB) {
|
||||
TextInputEditText inputEditText = (TextInputEditText) v;
|
||||
|
||||
if (inputEditText != null) {
|
||||
|
||||
switch (inputEditText.getId()) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean isNetworkAvailable(){
|
||||
ConnectivityManager connectivityManager
|
||||
= (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
|
||||
return activeNetworkInfo !=null && activeNetworkInfo.isConnected();
|
||||
}
|
||||
|
||||
public void showMatch(View view) {
|
||||
startActivity(new Intent(this, ScouterInitialsActivity.class));
|
||||
}
|
||||
|
||||
public void showPit(View view) {
|
||||
startActivity(new Intent(this, PitActivity.class));
|
||||
}
|
||||
|
||||
public void sendData(View view) {
|
||||
startActivity(new Intent(this, SendDataActivity.class));
|
||||
}
|
||||
|
||||
public void getTeams(View view){
|
||||
|
||||
if(isNetworkAvailable()){
|
||||
|
||||
TeamsDbHelper.dropTable(db);
|
||||
TeamsDbHelper.createTable(db);
|
||||
GetJasonData process = new GetJasonData(this);
|
||||
process.execute();
|
||||
|
||||
Toast.makeText(this, "Import Complete", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
else{
|
||||
|
||||
CustomToast.showLong(this, "Sorry! But your WiFi doesn't seem to be on at this time");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
980
app/src/main/java/com/example/ncgears/scouting/PitActivity.java
Normal file
@@ -0,0 +1,980 @@
|
||||
/*
|
||||
|
||||
*************** Code Designed by Team 107 Team Robotics *********************
|
||||
*************** Edited for Team 1918 By Nate and Ken *********************
|
||||
|
||||
|
||||
*/
|
||||
|
||||
package com.example.ncgears.scouting;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Color;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.provider.MediaStore;
|
||||
import android.provider.Settings;
|
||||
import android.support.v4.app.ActivityCompat;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v4.content.FileProvider;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.EditText;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.example.ncgears.scouting.data.TeamsDbHelper;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import utils.FormatStringUtils;
|
||||
import utils.PermissionUtils;
|
||||
import utils.StringUtils;
|
||||
import utils.ViewUtils;
|
||||
|
||||
/**
|
||||
* Created by Matt from Team 107 on 9/30/2017.
|
||||
* Borrowed by Ken from Team 1918 on 1/7/2019.
|
||||
*/
|
||||
|
||||
public class PitActivity extends AppCompatActivity implements View.OnKeyListener {
|
||||
|
||||
@BindView(R.id.pit_team_number_spinner)
|
||||
public Spinner pitTeamNumberSpinner;
|
||||
|
||||
@BindView(R.id.pit_power_cell_pickup_radio_group)
|
||||
public RadioGroup pitPowerCellPickupRadioGroup;
|
||||
|
||||
@BindView(R.id.pit_robot_weight)
|
||||
public EditText pitRobotWeight;
|
||||
|
||||
@BindView(R.id.pit_drive_train_spinner)
|
||||
public Spinner pitDriveTrainSpinner;
|
||||
|
||||
@BindView(R.id.drive_train_other)
|
||||
public EditText driveTrainOther;
|
||||
|
||||
@BindView(R.id.pit_programming_language_spinner)
|
||||
public Spinner pitProgrammingLanguages;
|
||||
|
||||
@BindView(R.id.programming_language_other)
|
||||
public EditText programmingLanguageOther;
|
||||
|
||||
@BindView(R.id.pit_basic_plan)
|
||||
public EditText pitBasicPlan;
|
||||
|
||||
@BindView(R.id.pit_auto_programs)
|
||||
public EditText pitAutoPrograms;
|
||||
|
||||
@BindView(R.id.pit_shoot_target_zone)
|
||||
public CheckBox pitShootTargetZone;
|
||||
|
||||
@BindView(R.id.pit_shoot_field_front)
|
||||
public CheckBox pitShootFieldFront;
|
||||
|
||||
@BindView(R.id.pit_shoot_field_diagonal)
|
||||
public CheckBox pitShootFieldDiagonal;
|
||||
|
||||
@BindView(R.id.pit_shoot_trench_near)
|
||||
public CheckBox pitShootTrenchNear;
|
||||
|
||||
@BindView(R.id.pit_shoot_trench_far)
|
||||
public CheckBox pitShootTrenchFar;
|
||||
|
||||
@BindView(R.id.pit_shoot_other)
|
||||
public CheckBox pitShootOther;
|
||||
|
||||
public String shotString = "";
|
||||
|
||||
@BindView(R.id.pit_fav_target_zone)
|
||||
public CheckBox pitFavTargetZone;
|
||||
|
||||
@BindView(R.id.pit_fav_field_front)
|
||||
public CheckBox pitFavFieldFront;
|
||||
|
||||
@BindView(R.id.pit_fav_field_diagonal)
|
||||
public CheckBox pitFavFieldDiagonal;
|
||||
|
||||
@BindView(R.id.pit_fav_trench_near)
|
||||
public CheckBox pitFavTrenchNear;
|
||||
|
||||
@BindView(R.id.pit_fav_trench_far)
|
||||
public CheckBox pitFavTrenchFar;
|
||||
|
||||
@BindView(R.id.pit_fav_other)
|
||||
public CheckBox pitFavOther;
|
||||
|
||||
public String favShotString = "";
|
||||
|
||||
// @BindView(R.id.pit_end_game_location_spinner)
|
||||
// public Spinner pitEndGameLocationSpinner;
|
||||
|
||||
@BindView(R.id.pit_shot_location_inner)
|
||||
public CheckBox pitShotLocationInner;
|
||||
|
||||
@BindView(R.id.pit_shot_location_outer)
|
||||
public CheckBox pitShotLocationOuter;
|
||||
|
||||
@BindView(R.id.pit_shot_location_bottom)
|
||||
public CheckBox pitShotLocationBottom;
|
||||
|
||||
@BindView(R.id.pit_shot_location_na)
|
||||
public CheckBox pitShotLocationNa;
|
||||
|
||||
public String pitShotLocationString = "";
|
||||
|
||||
// @BindView(R.id.pit_control_panel_rotate_3to5)
|
||||
public CheckBox pitControlPanelRotate3to5;
|
||||
|
||||
// @BindView(R.id.pit_control_panel_position)
|
||||
public CheckBox pitControlPanelPosition;
|
||||
|
||||
// @BindView(R.id.pit_control_panel_nothing)
|
||||
public CheckBox pitControlPanelNothing;
|
||||
|
||||
public String ControlPanelString = "";
|
||||
|
||||
@BindView(R.id.pit_endgame_location)
|
||||
public RadioGroup pitEndgameLocation;
|
||||
|
||||
@BindView(R.id.pit_drive_thru_trench)
|
||||
public RadioGroup pitDriveThruTrench;
|
||||
|
||||
// @BindView(R.id.pit_endgame_hang)
|
||||
// public CheckBox pitEndgameHang;
|
||||
|
||||
@BindView(R.id.scouterInitials_input)
|
||||
public EditText scouterInitialsInput;
|
||||
|
||||
|
||||
@BindView(R.id.take_photo_btn)
|
||||
public Button takePhotoBtn;
|
||||
|
||||
@BindView(R.id.save_pit_btn)
|
||||
public Button savePitBtn;
|
||||
|
||||
@BindView(R.id.pit_robot_name)
|
||||
public EditText RobotNameInput;
|
||||
|
||||
public ArrayList<String> team_numbers = new ArrayList<>();
|
||||
private ArrayList<CharSequence> pitDataStringList;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
TeamsDbHelper mDbHelper = new TeamsDbHelper(this);
|
||||
SQLiteDatabase db = mDbHelper.getReadableDatabase();
|
||||
|
||||
setContentView(R.layout.activity_pit);
|
||||
pitDataStringList = new ArrayList<>();
|
||||
|
||||
team_numbers = TeamsDbHelper.getTeamNumbers(db);
|
||||
|
||||
ButterKnife.bind(this);
|
||||
|
||||
checkForPermissions();
|
||||
|
||||
pitDriveTrainSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
if(pitDriveTrainSpinner.getSelectedItem().toString().equals("Other")){
|
||||
driveTrainOther.setVisibility(view.VISIBLE);
|
||||
}
|
||||
else{
|
||||
driveTrainOther.setVisibility(view.INVISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> adapterView) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
pitProgrammingLanguages.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
if(pitProgrammingLanguages.getSelectedItem().toString().equals("Other")){
|
||||
programmingLanguageOther.setVisibility(view.VISIBLE);
|
||||
}
|
||||
else{
|
||||
programmingLanguageOther.setVisibility(view.INVISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> adapterView) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// --- Drive Train spinner ---
|
||||
|
||||
// Spinner drivetrainspinner = (Spinner) findViewById(R.id.pit_drive_train_spinner);
|
||||
// Create an ArrayAdapter using the string array and a default spinner layout
|
||||
ArrayAdapter<CharSequence> drivetrainadapter = ArrayAdapter.createFromResource(this,
|
||||
R.array.driveTrain, android.R.layout.simple_spinner_item);
|
||||
// Specify the layout to use when the list of choices appears
|
||||
drivetrainadapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||
// Apply the adapter to the spinner
|
||||
pitDriveTrainSpinner.setAdapter(drivetrainadapter);
|
||||
|
||||
// --- Team Numbers spinner ---
|
||||
|
||||
// Spinner teamnumberspinner = (Spinner) findViewById(R.id.pit_team_number_spinner);
|
||||
// Create an ArrayAdapter using the string array and a default spinner layout
|
||||
ArrayAdapter teamnumberadapter = new ArrayAdapter<>(PitActivity.this,
|
||||
android.R.layout.simple_spinner_dropdown_item, team_numbers);
|
||||
// Specify the layout to use when the list of choices appears
|
||||
teamnumberadapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||
// Apply the adapter to the spinner
|
||||
pitTeamNumberSpinner.setAdapter(teamnumberadapter);
|
||||
|
||||
|
||||
// --- Programming languages spinner ---
|
||||
|
||||
// Spinner languagespinner = (Spinner) findViewById(R.id.pit_programming_language_spinner);
|
||||
// Create an ArrayAdapter using the string array and a default spinner layout
|
||||
ArrayAdapter<CharSequence> languageadapter = ArrayAdapter.createFromResource(this,
|
||||
R.array.programmingLanguages, android.R.layout.simple_spinner_item);
|
||||
// Specify the layout to use when the list of choices appears
|
||||
languageadapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||
// Apply the adapter to the spinner
|
||||
pitProgrammingLanguages.setAdapter(languageadapter);
|
||||
|
||||
// --- End Game Location spinner ---
|
||||
|
||||
// Spinner pitendgamelocationspinner = (Spinner) findViewById(R.id.pit_end_game_location_spinner);
|
||||
// Create an ArrayAdapter using the string array and a default spinner layout
|
||||
ArrayAdapter<CharSequence> pitendgamelocationadapter = ArrayAdapter.createFromResource(this,
|
||||
R.array.endgame_location, android.R.layout.simple_spinner_item);
|
||||
// Specify the layout to use when the list of choices appears
|
||||
pitendgamelocationadapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||
// Apply the adapter to the spinner
|
||||
// pitendgamelocationspinner.setAdapter(pitendgamelocationadapter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
getMenuInflater().inflate(R.menu.main_menu, menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case R.id.main_activity:
|
||||
startActivity(new Intent(this, MainActivity.class));
|
||||
return true;
|
||||
case R.id.send_data:
|
||||
startActivity(new Intent(this, SendDataActivity.class));
|
||||
return true;
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
|
||||
public void setStringShot(View view) {
|
||||
boolean checked = ((CheckBox) view).isChecked();
|
||||
String s1;
|
||||
|
||||
switch (view.getId()) {
|
||||
|
||||
case R.id.pit_shoot_trench_near:
|
||||
s1 = pitShootTrenchNear.getText().toString() + " ,";
|
||||
if (checked) {
|
||||
if (shotString.isEmpty()) {
|
||||
shotString = s1;
|
||||
} else {
|
||||
shotString = shotString + s1;
|
||||
}
|
||||
} else {
|
||||
if (shotString.contains(s1)) {
|
||||
int start = shotString.indexOf(s1);
|
||||
shotString = shotString.substring(0, start) + shotString.substring(start + s1.length());
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case R.id.pit_shoot_trench_far:
|
||||
s1 = pitShootTrenchFar.getText().toString() + " ,";
|
||||
if (checked) {
|
||||
if (shotString.isEmpty()) {
|
||||
shotString = s1;
|
||||
} else {
|
||||
shotString = shotString + s1;
|
||||
}
|
||||
} else {
|
||||
if (shotString.contains(s1)) {
|
||||
int start = shotString.indexOf(s1);
|
||||
shotString = shotString.substring(0, start) + shotString.substring(start + s1.length());
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case R.id.pit_shoot_other:
|
||||
s1 = pitShootOther.getText().toString() + " ,";
|
||||
if (checked) {
|
||||
if (shotString.isEmpty()) {
|
||||
shotString = s1;
|
||||
} else {
|
||||
shotString = shotString + s1;
|
||||
}
|
||||
} else {
|
||||
if (shotString.contains(s1)) {
|
||||
int start = shotString.indexOf(s1);
|
||||
shotString = shotString.substring(0, start) + shotString.substring(start + s1.length());
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case R.id.pit_shoot_target_zone:
|
||||
s1 = pitShootTargetZone.getText().toString() + " ,";
|
||||
if (checked) {
|
||||
if (shotString.isEmpty()) {
|
||||
shotString = s1;
|
||||
} else {
|
||||
shotString = shotString + s1;
|
||||
}
|
||||
} else {
|
||||
if (shotString.contains(s1)) {
|
||||
int start = shotString.indexOf(s1);
|
||||
shotString = shotString.substring(0, start) + shotString.substring(start + s1.length());
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case R.id.pit_shoot_field_diagonal:
|
||||
s1 = pitShootFieldDiagonal.getText().toString() + " ,";
|
||||
if (checked) {
|
||||
if (shotString.isEmpty()) {
|
||||
shotString = s1;
|
||||
} else {
|
||||
shotString = shotString + s1;
|
||||
}
|
||||
} else {
|
||||
if (shotString.contains(s1)) {
|
||||
int start = shotString.indexOf(s1);
|
||||
shotString = shotString.substring(0, start) + shotString.substring(start + s1.length());
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case R.id.pit_shoot_field_front:
|
||||
s1 = pitShootFieldFront.getText().toString() + " ,";
|
||||
if (checked) {
|
||||
if (shotString.isEmpty()) {
|
||||
shotString = s1;
|
||||
} else {
|
||||
shotString = shotString + s1;
|
||||
}
|
||||
} else {
|
||||
if (shotString.contains(s1)) {
|
||||
int start = shotString.indexOf(s1);
|
||||
shotString = shotString.substring(0, start) + shotString.substring(start + s1.length());
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void setStringFavShot(View view) {
|
||||
boolean checked = ((CheckBox) view).isChecked();
|
||||
String s1;
|
||||
|
||||
switch (view.getId()) {
|
||||
|
||||
case R.id.pit_fav_trench_near:
|
||||
s1 = pitFavTrenchNear.getText().toString() + " ,";
|
||||
if (checked) {
|
||||
if (favShotString.isEmpty()) {
|
||||
favShotString = s1;
|
||||
} else {
|
||||
favShotString = favShotString + s1;
|
||||
}
|
||||
} else {
|
||||
if (favShotString.contains(s1)) {
|
||||
int start = favShotString.indexOf(s1);
|
||||
favShotString = favShotString.substring(0, start) + favShotString.substring(start + s1.length());
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case R.id.pit_fav_trench_far:
|
||||
s1 = pitFavTrenchFar.getText().toString() + " ,";
|
||||
if (checked) {
|
||||
if (favShotString.isEmpty()) {
|
||||
favShotString = s1;
|
||||
} else {
|
||||
favShotString = favShotString + s1;
|
||||
}
|
||||
} else {
|
||||
if (favShotString.contains(s1)) {
|
||||
int start = favShotString.indexOf(s1);
|
||||
favShotString = favShotString.substring(0, start) + favShotString.substring(start + s1.length());
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case R.id.pit_fav_other:
|
||||
s1 = pitFavOther.getText().toString() + " ,";
|
||||
if (checked) {
|
||||
if (favShotString.isEmpty()) {
|
||||
favShotString = s1;
|
||||
} else {
|
||||
favShotString = favShotString + s1;
|
||||
}
|
||||
} else {
|
||||
if (favShotString.contains(s1)) {
|
||||
int start = favShotString.indexOf(s1);
|
||||
favShotString = favShotString.substring(0, start) + favShotString.substring(start + s1.length());
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case R.id.pit_fav_target_zone:
|
||||
s1 = pitFavTargetZone.getText().toString() + " ,";
|
||||
if (checked) {
|
||||
if (favShotString.isEmpty()) {
|
||||
favShotString = s1;
|
||||
} else {
|
||||
favShotString = favShotString + s1;
|
||||
}
|
||||
} else {
|
||||
if (favShotString.contains(s1)) {
|
||||
int start = favShotString.indexOf(s1);
|
||||
favShotString = favShotString.substring(0, start) + favShotString.substring(start + s1.length());
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case R.id.pit_fav_field_diagonal:
|
||||
s1 = pitFavFieldDiagonal.getText().toString() + " ,";
|
||||
if (checked) {
|
||||
if (favShotString.isEmpty()) {
|
||||
favShotString = s1;
|
||||
} else {
|
||||
favShotString = favShotString + s1;
|
||||
}
|
||||
} else {
|
||||
if (favShotString.contains(s1)) {
|
||||
int start = favShotString.indexOf(s1);
|
||||
favShotString = favShotString.substring(0, start) + favShotString.substring(start + s1.length());
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case R.id.pit_fav_field_front:
|
||||
s1 = pitFavFieldFront.getText().toString() + " ,";
|
||||
if (checked) {
|
||||
if (favShotString.isEmpty()) {
|
||||
favShotString = s1;
|
||||
} else {
|
||||
favShotString = favShotString + s1;
|
||||
}
|
||||
} else {
|
||||
if (favShotString.contains(s1)) {
|
||||
int start = favShotString.indexOf(s1);
|
||||
favShotString = favShotString.substring(0, start) + favShotString.substring(start + s1.length());
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void setPowerPortShotString(View view) {
|
||||
boolean checked = ((CheckBox) view).isChecked();
|
||||
String s1;
|
||||
|
||||
switch (view.getId()) {
|
||||
|
||||
case R.id.pit_shoot_trench_near:
|
||||
s1 = pitShootTrenchNear.getText().toString() + " ,";
|
||||
if (checked) {
|
||||
if (shotString.isEmpty()) {
|
||||
shotString = s1;
|
||||
} else {
|
||||
shotString = shotString + s1;
|
||||
}
|
||||
} else {
|
||||
if (shotString.contains(s1)) {
|
||||
int start = shotString.indexOf(s1);
|
||||
shotString = shotString.substring(0, start) + shotString.substring(start + s1.length());
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case R.id.pit_shoot_trench_far:
|
||||
s1 = pitShootTrenchFar.getText().toString() + " ,";
|
||||
if (checked) {
|
||||
if (shotString.isEmpty()) {
|
||||
shotString = s1;
|
||||
} else {
|
||||
shotString = shotString + s1;
|
||||
}
|
||||
} else {
|
||||
if (shotString.contains(s1)) {
|
||||
int start = shotString.indexOf(s1);
|
||||
shotString = shotString.substring(0, start) + shotString.substring(start + s1.length());
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case R.id.pit_shoot_other:
|
||||
s1 = pitShootOther.getText().toString() + " ,";
|
||||
if (checked) {
|
||||
if (shotString.isEmpty()) {
|
||||
shotString = s1;
|
||||
} else {
|
||||
shotString = shotString + s1;
|
||||
}
|
||||
} else {
|
||||
if (shotString.contains(s1)) {
|
||||
int start = shotString.indexOf(s1);
|
||||
shotString = shotString.substring(0, start) + shotString.substring(start + s1.length());
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case R.id.pit_shoot_target_zone:
|
||||
s1 = pitShootTargetZone.getText().toString() + " ,";
|
||||
if (checked) {
|
||||
if (shotString.isEmpty()) {
|
||||
shotString = s1;
|
||||
} else {
|
||||
shotString = shotString + s1;
|
||||
}
|
||||
} else {
|
||||
if (shotString.contains(s1)) {
|
||||
int start = shotString.indexOf(s1);
|
||||
shotString = shotString.substring(0, start) + shotString.substring(start + s1.length());
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void setControlPanelString(View view) {
|
||||
boolean checked = ((CheckBox) view).isChecked();
|
||||
String s1;
|
||||
|
||||
// switch (view.getId()) {
|
||||
//
|
||||
// case R.id.pit_control_panel_rotate_3to5:
|
||||
// s1 = pitControlPanelRotate3to5.getText().toString() + " ,";
|
||||
// if (checked) {
|
||||
// if (ControlPanelString.isEmpty()) {
|
||||
// ControlPanelString = s1;
|
||||
// } else {
|
||||
// ControlPanelString = ControlPanelString + s1;
|
||||
// }
|
||||
// } else {
|
||||
// if (ControlPanelString.contains(s1)) {
|
||||
// int start = ControlPanelString.indexOf(s1);
|
||||
// ControlPanelString = ControlPanelString.substring(0, start) + ControlPanelString.substring(start + s1.length());
|
||||
// }
|
||||
// }
|
||||
// break;
|
||||
//
|
||||
// case R.id.pit_control_panel_position:
|
||||
// s1 = pitControlPanelPosition.getText().toString() + " ,";
|
||||
// if (checked) {
|
||||
// if (ControlPanelString.isEmpty()) {
|
||||
// ControlPanelString = s1;
|
||||
// } else {
|
||||
// ControlPanelString = ControlPanelString + s1;
|
||||
// }
|
||||
// } else {
|
||||
// if (ControlPanelString.contains(s1)) {
|
||||
// int start = ControlPanelString.indexOf(s1);
|
||||
// ControlPanelString = ControlPanelString.substring(0, start) + ControlPanelString.substring(start + s1.length());
|
||||
// }
|
||||
// }
|
||||
// break;
|
||||
|
||||
// case R.id.pit_control_panel_nothing:
|
||||
// s1 = pitControlPanelNothing.getText().toString() + " ,";
|
||||
// if (checked) {
|
||||
// if (ControlPanelString.isEmpty()) {
|
||||
// ControlPanelString = s1;
|
||||
// } else {
|
||||
// ControlPanelString = ControlPanelString + s1;
|
||||
// }
|
||||
// } else {
|
||||
// if (ControlPanelString.contains(s1)) {
|
||||
// int start = ControlPanelString.indexOf(s1);
|
||||
// ControlPanelString = ControlPanelString.substring(0, start) + ControlPanelString.substring(start + s1.length());
|
||||
// }
|
||||
// }
|
||||
// break;
|
||||
// }
|
||||
}
|
||||
|
||||
public void setPitShotLocationString(View view) {
|
||||
boolean checked = ((CheckBox) view).isChecked();
|
||||
String s1;
|
||||
|
||||
switch (view.getId()) {
|
||||
|
||||
case R.id.pit_shot_location_bottom:
|
||||
s1 = pitShotLocationBottom.getText().toString() + " ,";
|
||||
if (checked) {
|
||||
if (pitShotLocationString.isEmpty()) {
|
||||
pitShotLocationString = s1;
|
||||
} else {
|
||||
pitShotLocationString = pitShotLocationString + s1;
|
||||
}
|
||||
} else {
|
||||
if (pitShotLocationString.contains(s1)) {
|
||||
int start = pitShotLocationString.indexOf(s1);
|
||||
pitShotLocationString = pitShotLocationString.substring(0, start) + pitShotLocationString.substring(start + s1.length());
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case R.id.pit_shot_location_inner:
|
||||
s1 = pitShotLocationInner.getText().toString() + " ,";
|
||||
if (checked) {
|
||||
if (pitShotLocationString.isEmpty()) {
|
||||
pitShotLocationString = s1;
|
||||
} else {
|
||||
pitShotLocationString = pitShotLocationString + s1;
|
||||
}
|
||||
} else {
|
||||
if (pitShotLocationString.contains(s1)) {
|
||||
int start = pitShotLocationString.indexOf(s1);
|
||||
pitShotLocationString = pitShotLocationString.substring(0, start) + pitShotLocationString.substring(start + s1.length());
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case R.id.pit_shot_location_outer:
|
||||
s1 = pitShotLocationOuter.getText().toString() + " ,";
|
||||
if (checked) {
|
||||
if (pitShotLocationString.isEmpty()) {
|
||||
pitShotLocationString = s1;
|
||||
} else {
|
||||
pitShotLocationString = pitShotLocationString + s1;
|
||||
}
|
||||
} else {
|
||||
if (pitShotLocationString.contains(s1)) {
|
||||
int start = pitShotLocationString.indexOf(s1);
|
||||
pitShotLocationString = pitShotLocationString.substring(0, start) + pitShotLocationString.substring(start + s1.length());
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case R.id.pit_shot_location_na:
|
||||
s1 = pitShotLocationNa.getText().toString() + " ,";
|
||||
if (checked) {
|
||||
if (pitShotLocationString.isEmpty()) {
|
||||
pitShotLocationString = s1;
|
||||
} else {
|
||||
pitShotLocationString = pitShotLocationString + s1;
|
||||
}
|
||||
} else {
|
||||
if (pitShotLocationString.contains(s1)) {
|
||||
int start = pitShotLocationString.indexOf(s1);
|
||||
pitShotLocationString = pitShotLocationString.substring(0, start) + pitShotLocationString.substring(start + s1.length());
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
|
||||
pitTeamNumberSpinner.setOnKeyListener(this);
|
||||
pitDriveTrainSpinner.setOnKeyListener(this);
|
||||
// pitEndGameLocationSpinner.setOnKeyListener(this);
|
||||
driveTrainOther.setOnKeyListener(this);
|
||||
pitRobotWeight.setOnKeyListener(this);
|
||||
pitProgrammingLanguages.setOnKeyListener(this);
|
||||
programmingLanguageOther.setOnKeyListener(this);
|
||||
pitAutoPrograms.setOnKeyListener(this);
|
||||
pitDriveThruTrench.setOnKeyListener(this);
|
||||
pitBasicPlan.setOnKeyListener(this);
|
||||
pitPowerCellPickupRadioGroup.setOnKeyListener(this);
|
||||
pitEndgameLocation.setOnKeyListener(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
|
||||
pitTeamNumberSpinner.setOnKeyListener(null);
|
||||
pitDriveTrainSpinner.setOnKeyListener(null);
|
||||
driveTrainOther.setOnKeyListener(null);
|
||||
pitRobotWeight.setOnKeyListener(null);
|
||||
pitProgrammingLanguages.setOnKeyListener(null);
|
||||
programmingLanguageOther.setOnKeyListener(null);
|
||||
pitAutoPrograms.setOnKeyListener(null);
|
||||
pitDriveThruTrench.setOnKeyListener(null);
|
||||
// pitEndgameHang.setOnKeyListener(null);
|
||||
pitBasicPlan.setOnKeyListener(null);
|
||||
// pitEndGameLocationSpinner.setOnKeyListener(null);
|
||||
pitPowerCellPickupRadioGroup.setOnKeyListener(null);
|
||||
pitEndgameLocation.setOnKeyListener(null);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKey(View v, int keyCode, KeyEvent event) {
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public void savePitData(View view) throws IOException {
|
||||
String state = Environment.getExternalStorageState();
|
||||
boolean allInputsPassed = false;
|
||||
|
||||
// ****** Check Required fields set focus to field if it hasn't been filled out ******
|
||||
|
||||
|
||||
if (pitTeamNumberSpinner.getSelectedItem().toString().equals("Select Team Number") ) {
|
||||
setSpinnerError(pitTeamNumberSpinner, "Select a Team Number.");
|
||||
ViewUtils.requestFocus(pitTeamNumberSpinner, this);
|
||||
}else if (pitProgrammingLanguages.getSelectedItem().toString().equals("") ) {
|
||||
setSpinnerError(pitProgrammingLanguages, "Select a Programming Language.");
|
||||
ViewUtils.requestFocus(pitProgrammingLanguages, this);
|
||||
}else if(pitDriveTrainSpinner.getSelectedItem().toString().equals("")){
|
||||
setSpinnerError(pitDriveTrainSpinner, "Select a drive train.");
|
||||
ViewUtils.requestFocus(pitDriveTrainSpinner, this);
|
||||
} else if (StringUtils.isEmptyOrNull(pitRobotWeight.getText().toString())) {
|
||||
pitRobotWeight.setError(getText(R.string.pitRobotWeightError));
|
||||
ViewUtils.requestFocus(pitRobotWeight, this);
|
||||
} else if (StringUtils.isEmptyOrNull(scouterInitialsInput.getText().toString())) {
|
||||
scouterInitialsInput.setError(getText(R.string.scouterInitialsError));
|
||||
ViewUtils.requestFocus(scouterInitialsInput, this);
|
||||
} else {
|
||||
allInputsPassed = true;
|
||||
}
|
||||
if (!allInputsPassed) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
final RadioButton pitDriveThruTrenchbtn = findViewById(pitDriveThruTrench.getCheckedRadioButtonId());
|
||||
// final RadioButton pitEndgameHangbtn = findViewById(pitEndgameHang.getCheckedRadioButtonId());
|
||||
final RadioButton pitPowerCellPickUpRadioBtn = findViewById(pitPowerCellPickupRadioGroup.getCheckedRadioButtonId());
|
||||
final RadioButton pitEndgameLocationBtn = findViewById(pitEndgameLocation.getCheckedRadioButtonId());
|
||||
|
||||
if(PermissionUtils.getPermissions(this, Manifest.permission.WRITE_EXTERNAL_STORAGE)) {
|
||||
if (Environment.MEDIA_MOUNTED.equals(state)) {
|
||||
File dir = new File(Environment.getExternalStorageDirectory() + "/Scouting");
|
||||
//create csv file
|
||||
File file = new File(dir, "Pit" + Settings.Secure.getString(getContentResolver(), Settings.Secure.ANDROID_ID) + ".csv");
|
||||
|
||||
pitDataStringList.add(pitTeamNumberSpinner.getSelectedItem().toString());
|
||||
pitDataStringList.add(RobotNameInput.getText().toString());
|
||||
pitDataStringList.add(pitRobotWeight.getText().toString());
|
||||
pitDataStringList.add(pitDriveTrainSpinner.getSelectedItem().toString());
|
||||
pitDataStringList.add(driveTrainOther.getText().toString());
|
||||
pitDataStringList.add(pitProgrammingLanguages.getSelectedItem().toString());
|
||||
pitDataStringList.add(programmingLanguageOther.getText().toString());
|
||||
pitDataStringList.add(pitAutoPrograms.getText().toString());
|
||||
pitDataStringList.add(pitPowerCellPickUpRadioBtn.getText().toString());
|
||||
pitDataStringList.add(shotString);
|
||||
pitDataStringList.add(favShotString);
|
||||
// pitDataStringList.add(pitDriveThruTrenchbtn.getText().toString());
|
||||
pitDataStringList.add(pitShotLocationString);
|
||||
pitDataStringList.add(ControlPanelString);
|
||||
// pitDataStringList.add(pitEndGameLocationSpinner.getSelectedItem().toString());
|
||||
pitDataStringList.add(pitEndgameLocationBtn.getText().toString());
|
||||
pitDataStringList.add(pitBasicPlan.getText().toString());
|
||||
pitDataStringList.add(scouterInitialsInput.getText().toString());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String message = FormatStringUtils.addDelimiter(pitDataStringList, "|") + "\n";
|
||||
|
||||
|
||||
//Output data to file
|
||||
try {
|
||||
FileOutputStream fileOutputStream = new FileOutputStream(file, true);
|
||||
fileOutputStream.write(message.getBytes());
|
||||
fileOutputStream.close();
|
||||
|
||||
Toast.makeText(getApplicationContext(), "Saved!", Toast.LENGTH_LONG).show();
|
||||
} catch (IOException e) {
|
||||
Toast.makeText(getApplicationContext(), "IOException! Go talk to the programmers!", Toast.LENGTH_LONG).show();
|
||||
Log.d("Scouting", e.getMessage());
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(getApplicationContext(), "SD card not found", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
clearData();
|
||||
pitTeamNumberSpinner.requestFocus();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void takePhoto(View view) {
|
||||
String name = pitTeamNumberSpinner.getSelectedItem().toString();
|
||||
|
||||
if(PermissionUtils.getPermissions(this, Manifest.permission.CAMERA) &&
|
||||
PermissionUtils.getPermissions(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) &&
|
||||
PermissionUtils.getPermissions(this, Manifest.permission.READ_EXTERNAL_STORAGE)) {
|
||||
if (!StringUtils.isEmptyOrNull(name)) {
|
||||
File dir = new File(Environment.getExternalStorageDirectory() + "/Scouting/Photos");
|
||||
dir.mkdirs();
|
||||
|
||||
File file = new File(dir, name + ".jpg");
|
||||
|
||||
try {
|
||||
file.createNewFile();
|
||||
} catch (IOException e) {
|
||||
Log.d("Scouting", e.getMessage());
|
||||
}
|
||||
|
||||
Uri outputUri = FileProvider.getUriForFile(this, BuildConfig.APPLICATION_ID + ".provider", file);
|
||||
|
||||
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
if (takePictureIntent.resolveActivity(getPackageManager()) != null) {
|
||||
takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, outputUri);
|
||||
startActivityForResult(takePictureIntent, 0);
|
||||
}
|
||||
} else {
|
||||
//setSpinnerError(pitTeamNumberInputLayout, "Select a Team Number.");
|
||||
ViewUtils.requestFocus(pitTeamNumberSpinner, this);
|
||||
}
|
||||
} else {
|
||||
checkForPermissions();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
if (requestCode == 0) {
|
||||
if(resultCode == RESULT_OK) {
|
||||
compressPhoto();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void compressPhoto() {
|
||||
try {
|
||||
String name = pitTeamNumberSpinner.getSelectedItem().toString();
|
||||
|
||||
File dir = new File(Environment.getExternalStorageDirectory() + "/Scouting/Photos");
|
||||
File file = new File(dir, name + ".jpg");
|
||||
|
||||
FileInputStream inputStream = new FileInputStream(file);
|
||||
Bitmap bitmap = BitmapFactory.decodeStream(inputStream);
|
||||
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
bitmap.compress(Bitmap.CompressFormat.JPEG, 25, out);
|
||||
|
||||
FileOutputStream outputStream = new FileOutputStream(file);
|
||||
outputStream.write(out.toByteArray());
|
||||
inputStream.close();
|
||||
out.close();
|
||||
outputStream.close();
|
||||
|
||||
Toast.makeText(this, "Photo taken!", Toast.LENGTH_SHORT).show();
|
||||
} catch (IOException e) {
|
||||
Log.d("Scouting", e.getMessage());
|
||||
Toast.makeText(this, "Failed to save photo. Try again!", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
|
||||
private void setSpinnerError(Spinner spinner, String error){
|
||||
View selectedView = spinner.getSelectedView();
|
||||
if (selectedView instanceof TextView){
|
||||
spinner.requestFocus();
|
||||
TextView selectedTextView = (TextView) selectedView;
|
||||
selectedTextView.setError("error");
|
||||
selectedTextView.setTextColor(Color.RED);
|
||||
selectedTextView.setText(error);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void clearData() {
|
||||
pitTeamNumberSpinner.setSelection(0);
|
||||
pitRobotWeight.setText(null);
|
||||
pitDriveTrainSpinner.setSelection(0);
|
||||
driveTrainOther.setText(null);
|
||||
pitProgrammingLanguages.setSelection(0);
|
||||
programmingLanguageOther.setText(null);
|
||||
pitAutoPrograms.setText(null);
|
||||
scouterInitialsInput.setText(null);
|
||||
pitControlPanelNothing.setChecked(false);
|
||||
pitControlPanelPosition.setChecked(false);
|
||||
pitControlPanelRotate3to5.setChecked(false);
|
||||
pitShootTrenchNear.setChecked(false);
|
||||
pitShootTrenchFar.setChecked(false);
|
||||
pitShootOther.setChecked(false);
|
||||
pitShootFieldFront.setChecked(false);
|
||||
pitShootFieldDiagonal.setChecked(false);
|
||||
pitShootTargetZone.setChecked(false);
|
||||
// pitEndgameHang.setChecked(false);
|
||||
pitDriveThruTrench.clearCheck();
|
||||
pitShotLocationOuter.setChecked(false);
|
||||
pitShotLocationInner.setChecked(false);
|
||||
pitShotLocationBottom.setChecked(false);
|
||||
pitShotLocationNa.setChecked(false);
|
||||
pitBasicPlan.setText(null);
|
||||
// pitEndGameLocationSpinner.setSelection(0);
|
||||
ControlPanelString = "";
|
||||
shotString = "";
|
||||
pitShotLocationString = "";
|
||||
RobotNameInput.setText(null);
|
||||
|
||||
pitDataStringList.clear();
|
||||
}
|
||||
|
||||
private void checkForPermissions() {
|
||||
int cameraPermission = ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA);
|
||||
if (cameraPermission != PackageManager.PERMISSION_GRANTED) {
|
||||
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CAMERA}, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
/*
|
||||
|
||||
*************** Code Designed by Team 107 Team Robotics *********************
|
||||
*************** Edited for Team 1918 By Nate and Ken *********************
|
||||
|
||||
|
||||
*/
|
||||
|
||||
package com.example.ncgears.scouting;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.design.widget.TextInputEditText;
|
||||
import android.support.design.widget.TextInputLayout;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Toast;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import utils.StringUtils;
|
||||
import utils.ViewUtils;
|
||||
|
||||
public class ScouterInitialsActivity extends AppCompatActivity implements View.OnKeyListener {
|
||||
|
||||
@BindView(R.id.scouterInitials_input_layout)
|
||||
public TextInputLayout scouterInitialsInputLayout;
|
||||
|
||||
@BindView(R.id.scouterInitials_input)
|
||||
public TextInputEditText scouterInitialsInput;
|
||||
|
||||
private static String initials;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
setContentView(R.layout.activity_scouter_initials);
|
||||
ButterKnife.bind(this);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
getMenuInflater().inflate(R.menu.main_menu, menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case R.id.main_activity:
|
||||
startActivity(new Intent(this, MainActivity.class));
|
||||
return true;
|
||||
case R.id.send_data:
|
||||
startActivity(new Intent(this, SendDataActivity.class));
|
||||
return true;
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKey(View v, int keyCode, KeyEvent event) {
|
||||
if (keyCode != KeyEvent.KEYCODE_SPACE && keyCode != KeyEvent.KEYCODE_TAB) {
|
||||
TextInputEditText inputEditText = (TextInputEditText) v;
|
||||
|
||||
if (inputEditText != null) {
|
||||
|
||||
switch (inputEditText.getId()) {
|
||||
case R.id.scouterInitials_input_layout:
|
||||
scouterInitialsInputLayout.setError(null);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static String getInitials() {
|
||||
return initials;
|
||||
}
|
||||
|
||||
public void submitInitials(View view) {
|
||||
initials = getTextInputLayoutString(scouterInitialsInputLayout);
|
||||
scouterInitialsInput.setText(null);
|
||||
|
||||
if(!StringUtils.isEmptyOrNull(initials))
|
||||
startActivity(new Intent(this, AutonActivity.class));
|
||||
else
|
||||
scouterInitialsInputLayout.setError(getText(R.string.scouterInitialsError));
|
||||
}
|
||||
|
||||
private String getTextInputLayoutString(@NonNull TextInputLayout textInputLayout) {
|
||||
final EditText editText = textInputLayout.getEditText();
|
||||
return editText != null && editText.getText() != null ? editText.getText().toString() : "";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,211 @@
|
||||
/*
|
||||
|
||||
*************** Code Designed by Team 107 Team Robotics *********************
|
||||
*************** Edited for Team 1918 By Nate and Ken *********************
|
||||
|
||||
|
||||
*/
|
||||
|
||||
package com.example.ncgears.scouting;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.ActionBar;
|
||||
import android.bluetooth.BluetoothAdapter;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.os.Message;
|
||||
import android.os.Parcelable;
|
||||
import android.provider.Settings;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.design.widget.TextInputEditText;
|
||||
import android.support.design.widget.TextInputLayout;
|
||||
import android.support.v4.content.FileProvider;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.FileReader;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import utils.FormatStringUtils;
|
||||
import utils.PermissionUtils;
|
||||
|
||||
import static android.os.Environment.getExternalStorageDirectory;
|
||||
|
||||
/**
|
||||
* Created by Matt on 10/9/2017.
|
||||
*/
|
||||
|
||||
public class SendDataActivity extends AppCompatActivity {
|
||||
|
||||
// @BindView(R.id.matchOrPit_RadiobtnGrp)
|
||||
public RadioGroup matchOrPitRadiobtnGrp;
|
||||
|
||||
// @BindView(R.id.concatFolder_editText)
|
||||
public EditText concatFolderEditText;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_send_data);
|
||||
|
||||
ButterKnife.bind(this);
|
||||
}
|
||||
|
||||
/* This method will display the options menu when the icon is pressed
|
||||
* and this will inflate the menu options for the user to choose
|
||||
*/
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
getMenuInflater().inflate(R.menu.main_menu, menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
/*This method will launch the correct activity
|
||||
*based on the menu option user presses
|
||||
*/
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case R.id.main_activity:
|
||||
startActivity(new Intent(this, MainActivity.class));
|
||||
return true;
|
||||
case R.id.send_data:
|
||||
startActivity(new Intent(this, SendDataActivity.class));
|
||||
return true;
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
|
||||
public void concatenateData(View view) {
|
||||
if(PermissionUtils.getPermissions(this, Manifest.permission.READ_EXTERNAL_STORAGE) &&
|
||||
PermissionUtils.getPermissions(this, Manifest.permission.READ_EXTERNAL_STORAGE)) {
|
||||
RadioButton radioButton = findViewById(matchOrPitRadiobtnGrp.getCheckedRadioButtonId());
|
||||
|
||||
if(radioButton != null) {
|
||||
String dir = Environment.getExternalStorageDirectory() + "/" + concatFolderEditText.getText().toString();
|
||||
|
||||
File folder = new File(dir);
|
||||
|
||||
if(folder.exists() && concatFolderEditText.getText().toString().length() > 0) {
|
||||
File[] files = folder.listFiles();
|
||||
|
||||
StringBuilder builder = new StringBuilder();
|
||||
FileReader fileReader;
|
||||
BufferedReader bufferedReader;
|
||||
FileOutputStream fileOutputStream;
|
||||
|
||||
String type = radioButton.getText().toString().contains("Match") ? "Match" : "Pit";
|
||||
|
||||
if (files != null) {
|
||||
try {
|
||||
int fileCount = 0;
|
||||
for (File file : files) {
|
||||
if (file.getName().contains(type)) {
|
||||
fileCount++;
|
||||
fileReader = new FileReader(file);
|
||||
bufferedReader = new BufferedReader(fileReader);
|
||||
|
||||
String line;
|
||||
while ((line = bufferedReader.readLine()) != null) {
|
||||
builder.append(line + '\n');
|
||||
}
|
||||
}
|
||||
}
|
||||
fileOutputStream = new FileOutputStream(new File(dir, "new.csv"), false);
|
||||
fileOutputStream.write("teamNumber,matchNumber,startingLocation,baseline,autoCubesInSwitch,autoCubesInScale,numberOfCubesInExchange,numberOfCubesInTheirSwitch,numberOfCubesInOpSwitch,NumberOfCubesInScale,cubePickup,climb,canHelpOthersClimb,onPlatform,defense,fouls,scouterInitials".getBytes());
|
||||
fileOutputStream.write(builder.toString().getBytes());
|
||||
fileOutputStream.close();
|
||||
|
||||
Toast.makeText(this, "Successfully concatenated " + fileCount + " " + type + " files to new.csv!", Toast.LENGTH_LONG).show();
|
||||
|
||||
} catch (IOException e) {
|
||||
Log.d("Scouting", e.getMessage());
|
||||
Toast.makeText(this, "Failed to concatenate data.", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
Toast.makeText(this, "Invalid folder name!", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(this, "Select an option!", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void sendMatchData(View view) {
|
||||
if(PermissionUtils.getPermissions(this, Manifest.permission.READ_EXTERNAL_STORAGE)) {
|
||||
Intent intent = new Intent(Intent.ACTION_SEND);
|
||||
String file = "storage/emulated/0/Scouting/Match" + Settings.Secure.getString(getContentResolver(), Settings.Secure.ANDROID_ID) + ".csv";
|
||||
intent.setType("text/plain");
|
||||
intent.setPackage("com.android.bluetooth");
|
||||
intent.putExtra(Intent.EXTRA_STREAM, FileProvider.getUriForFile(this, BuildConfig.APPLICATION_ID + ".provider", new File(file)));
|
||||
startActivity(Intent.createChooser(intent, "Share app"));
|
||||
}
|
||||
}
|
||||
|
||||
public void sendPitData(View view) {
|
||||
if(PermissionUtils.getPermissions(this, Manifest.permission.READ_EXTERNAL_STORAGE)) {
|
||||
Intent intent = new Intent(Intent.ACTION_SEND);
|
||||
String file = "storage/emulated/0/Scouting/Pit" + Settings.Secure.getString(getContentResolver(), Settings.Secure.ANDROID_ID) + ".csv";
|
||||
intent.setType("text/plain");
|
||||
intent.setPackage("com.android.bluetooth");
|
||||
intent.putExtra(Intent.EXTRA_STREAM, FileProvider.getUriForFile(this, BuildConfig.APPLICATION_ID + ".provider", new File(file)));
|
||||
startActivity(Intent.createChooser(intent, "Share app"));
|
||||
}
|
||||
}
|
||||
|
||||
public void sendRobotPhotos(View view) {
|
||||
if(PermissionUtils.getPermissions(this, Manifest.permission.READ_EXTERNAL_STORAGE)) {
|
||||
Intent intent = new Intent(Intent.ACTION_SEND_MULTIPLE);
|
||||
intent.setType("image/jpeg");
|
||||
intent.setPackage("com.android.bluetooth");
|
||||
String dir = "storage/emulated/0/Scouting/Photos/";
|
||||
|
||||
File folder = new File(dir);
|
||||
File[] photos = folder.listFiles();
|
||||
|
||||
if(photos != null) {
|
||||
ArrayList<Uri> toSend = new ArrayList<>();
|
||||
|
||||
for (int i = 0; i < photos.length; i++) {
|
||||
toSend.add(FileProvider.getUriForFile(this, BuildConfig.APPLICATION_ID + ".provider", photos[i]));
|
||||
}
|
||||
|
||||
intent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, toSend);
|
||||
startActivity(Intent.createChooser(intent, "Share app"));
|
||||
} else {
|
||||
Toast.makeText(this, "No photos!", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String getTextInputLayoutString(@NonNull TextInputLayout textInputLayout) {
|
||||
final EditText editText = textInputLayout.getEditText();
|
||||
return editText != null && editText.getText() != null ? editText.getText().toString() : "";
|
||||
}
|
||||
}
|
||||
1362
app/src/main/java/com/example/ncgears/scouting/TeleopActivity.java
Normal file
@@ -0,0 +1,55 @@
|
||||
package com.example.ncgears.scouting.customToast;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.example.ncgears.scouting.R;
|
||||
|
||||
public class CustomToast{
|
||||
|
||||
private static Toast currentToast;
|
||||
|
||||
public static void showShort(Context context, String message){
|
||||
if(currentToast != null) currentToast.cancel();
|
||||
LayoutInflater inflater = ((Activity)context).getLayoutInflater();
|
||||
View layout = inflater.inflate(R.layout.custom_toast, (ViewGroup) ((Activity) context).findViewById(R.id.root));
|
||||
TextView text = (TextView) layout.findViewById(R.id.message);
|
||||
|
||||
text.setText(message);
|
||||
|
||||
Toast toast = new Toast(context);
|
||||
|
||||
toast.setDuration(Toast.LENGTH_SHORT);
|
||||
|
||||
toast.setView(layout);
|
||||
toast.show();
|
||||
currentToast = toast;
|
||||
}
|
||||
|
||||
public static void showLong(Context context, String message){
|
||||
if(currentToast != null) currentToast.cancel();
|
||||
LayoutInflater inflater = ((Activity)context).getLayoutInflater();
|
||||
View layout = inflater.inflate(R.layout.custom_toast, (ViewGroup) ((Activity) context).findViewById(R.id.root));
|
||||
TextView text = (TextView) layout.findViewById(R.id.message);
|
||||
|
||||
text.setText(message);
|
||||
|
||||
Toast toast = new Toast(context);
|
||||
|
||||
toast.setDuration(Toast.LENGTH_LONG);
|
||||
|
||||
toast.setView(layout);
|
||||
toast.show();
|
||||
currentToast = toast;
|
||||
}
|
||||
|
||||
public static Toast getCurrentToast(){
|
||||
return currentToast;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package com.example.ncgears.scouting.data;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.content.Context;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.os.AsyncTask;
|
||||
|
||||
import com.example.ncgears.scouting.MainActivity;
|
||||
import com.example.ncgears.scouting.settings.settings.SettingsEntry;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
|
||||
|
||||
public class GetJasonData extends AsyncTask<Void, Void, Void>{
|
||||
|
||||
Context ctx;
|
||||
String data = "";
|
||||
String dataParsed = "";
|
||||
String singleParsed = "";
|
||||
String[] teams;
|
||||
|
||||
|
||||
public GetJasonData(Context ctx){
|
||||
|
||||
this.ctx = ctx;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected Void doInBackground(Void... voids) {
|
||||
|
||||
|
||||
|
||||
try {
|
||||
URL url = new URL(SettingsEntry.teamsUrl);
|
||||
|
||||
HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();
|
||||
InputStream inputStream = httpURLConnection.getInputStream();
|
||||
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream));
|
||||
|
||||
String line = "";
|
||||
|
||||
while (line != null){
|
||||
|
||||
line = bufferedReader.readLine();
|
||||
data = data + line;
|
||||
}
|
||||
|
||||
JSONObject JO = new JSONObject(data);
|
||||
JSONArray JA = JO.getJSONArray("valueRanges");
|
||||
JSONObject Jobj = new JSONObject(JA.getString(0));
|
||||
JSONArray Jarr = Jobj.getJSONArray("values");
|
||||
|
||||
TeamsDbHelper mDbHelper = new TeamsDbHelper(ctx);
|
||||
SQLiteDatabase db = mDbHelper.getWritableDatabase();
|
||||
ContentValues values = new ContentValues();
|
||||
|
||||
|
||||
for(int i = 0; i < Jarr.length(); i++){
|
||||
|
||||
|
||||
String teamNumber = Jarr.getJSONArray(i).getString(0);
|
||||
String teamName = Jarr.getJSONArray(i).getString(1);
|
||||
singleParsed = singleParsed + teamNumber + " | " + teamName + "\n";
|
||||
values.put(TeamsContract.TeamEntry.COLUMN_TEAM_NUMBER, teamNumber);
|
||||
values.put(TeamsContract.TeamEntry.COLUMN_TEAM_NAME, teamName);
|
||||
TeamsDbHelper.setTeams(db, values);
|
||||
}
|
||||
|
||||
|
||||
|
||||
db.close();
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (MalformedURLException e){
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(Void aVoid){
|
||||
super.onPostExecute(aVoid);
|
||||
|
||||
|
||||
MainActivity.data.setText(singleParsed);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.example.ncgears.scouting.data;
|
||||
|
||||
import android.provider.BaseColumns;
|
||||
|
||||
public class TeamsContract {
|
||||
|
||||
private TeamsContract(){}
|
||||
|
||||
public static final class TeamEntry implements BaseColumns {
|
||||
|
||||
// constant variable with Table Name
|
||||
public static final String TABLE_NAME = "teams";
|
||||
|
||||
// constant variables of column names
|
||||
public static final String _ID = BaseColumns._ID;
|
||||
public static final String COLUMN_TEAM_NUMBER = "team_number";
|
||||
public static final String COLUMN_TEAM_NAME = "team_name";
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
package com.example.ncgears.scouting.data;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
import android.util.Log;
|
||||
|
||||
import com.example.ncgears.scouting.data.TeamsContract.TeamEntry;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
||||
public class TeamsDbHelper extends SQLiteOpenHelper {
|
||||
|
||||
public static final String TAG = TeamsDbHelper.class.getSimpleName();
|
||||
private static final String DATABASE_NAME = "teams.db";
|
||||
private static final int DATABASE_VERSION = 1;
|
||||
|
||||
|
||||
public TeamsDbHelper(Context context){
|
||||
super(context, DATABASE_NAME, null, DATABASE_VERSION);
|
||||
|
||||
Log.d(TAG, "TeamsDbHelper: Database Created.");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onCreate(SQLiteDatabase db) {
|
||||
|
||||
createTable(db);
|
||||
|
||||
}
|
||||
|
||||
public static void createTable(SQLiteDatabase db){
|
||||
|
||||
String sql_create_teams_table = "CREATE TABLE "+ TeamEntry.TABLE_NAME +"("
|
||||
+ TeamEntry._ID +" Integer PRIMARY KEY AUTOINCREMENT, "
|
||||
+ TeamEntry.COLUMN_TEAM_NUMBER +" text NOT NULL, "
|
||||
+ TeamEntry.COLUMN_TEAM_NAME +" text);";
|
||||
|
||||
db.execSQL(sql_create_teams_table);
|
||||
|
||||
}
|
||||
|
||||
public static void dropTable(SQLiteDatabase db){
|
||||
|
||||
|
||||
|
||||
String sql_drop_table = "DROP TABLE if EXISTS " + TeamsContract.TeamEntry.TABLE_NAME + ";";
|
||||
|
||||
|
||||
db.execSQL(sql_drop_table);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static void setTeams(SQLiteDatabase db, ContentValues values){
|
||||
|
||||
|
||||
long newIndex = db.insert(TeamsContract.TeamEntry.TABLE_NAME, null, values);
|
||||
|
||||
}
|
||||
|
||||
public static ArrayList<String> getTeamNumbers(SQLiteDatabase db){
|
||||
|
||||
ArrayList<String> result = new ArrayList();
|
||||
|
||||
Cursor cursor = db.rawQuery("SELECT "+ TeamEntry.COLUMN_TEAM_NUMBER + " FROM teams;",null);
|
||||
|
||||
int numberColumn = cursor.getColumnIndex(TeamEntry.COLUMN_TEAM_NUMBER);
|
||||
|
||||
cursor.moveToFirst();
|
||||
|
||||
if(cursor != null && (cursor.getCount() > 0)){
|
||||
|
||||
int i = 0;
|
||||
|
||||
do {
|
||||
|
||||
result.add(cursor.getString(numberColumn));
|
||||
|
||||
}while (cursor.moveToNext());
|
||||
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
public static ArrayList<String> getTeams(SQLiteDatabase db){
|
||||
|
||||
ArrayList<String> result = new ArrayList();
|
||||
|
||||
Cursor cursor = db.rawQuery("SELECT * FROM teams;",null);
|
||||
|
||||
int numberColumn = cursor.getColumnIndex(TeamEntry.COLUMN_TEAM_NUMBER);
|
||||
int nameColumn = cursor.getColumnIndex(TeamEntry.COLUMN_TEAM_NAME);
|
||||
|
||||
cursor.moveToFirst();
|
||||
|
||||
if(cursor != null && (cursor.getCount() > 0)){
|
||||
|
||||
int i = 0;
|
||||
|
||||
do {
|
||||
|
||||
result.add(cursor.getString(numberColumn) + " | " + cursor.getString(nameColumn));
|
||||
|
||||
}while (cursor.moveToNext());
|
||||
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
23
app/src/main/java/utils/FormatStringUtils.java
Normal file
@@ -0,0 +1,23 @@
|
||||
package utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
||||
|
||||
public class FormatStringUtils {
|
||||
|
||||
public static String addDelimiter(ArrayList<CharSequence> strings, String delimiter) {
|
||||
|
||||
final StringBuilder stringBuilder = new StringBuilder();
|
||||
|
||||
for (int i = 0; i < strings.size(); i++) {
|
||||
stringBuilder.append(strings.get(i));
|
||||
|
||||
if (i < strings.size() - 1) {
|
||||
stringBuilder.append(delimiter);
|
||||
}
|
||||
}
|
||||
|
||||
return stringBuilder.toString();
|
||||
}
|
||||
}
|
||||
16
app/src/main/java/utils/PermissionUtils.java
Normal file
@@ -0,0 +1,16 @@
|
||||
package utils;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.support.v4.app.ActivityCompat;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
|
||||
public class PermissionUtils {
|
||||
public static boolean getPermissions(Activity activity, String type) {
|
||||
int permission = ContextCompat.checkSelfPermission(activity, type);
|
||||
if (permission != PackageManager.PERMISSION_GRANTED) {
|
||||
ActivityCompat.requestPermissions(activity, new String[]{type}, 1);
|
||||
}
|
||||
return permission == PackageManager.PERMISSION_GRANTED;
|
||||
}
|
||||
}
|
||||
7
app/src/main/java/utils/StringUtils.java
Normal file
@@ -0,0 +1,7 @@
|
||||
package utils;
|
||||
|
||||
public class StringUtils {
|
||||
public static boolean isEmptyOrNull(String string){
|
||||
return string == null || string.isEmpty();
|
||||
}
|
||||
}
|
||||
15
app/src/main/java/utils/ViewUtils.java
Normal file
@@ -0,0 +1,15 @@
|
||||
package utils;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
|
||||
public class ViewUtils {
|
||||
public static boolean requestFocus(View v, Activity activity){
|
||||
if(v.requestFocus()){
|
||||
activity.getWindow().setSoftInputMode((WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
34
app/src/main/res/drawable-v24/ic_launcher_foreground.xml
Normal file
@@ -0,0 +1,34 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportHeight="108"
|
||||
android:viewportWidth="108">
|
||||
<path
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
|
||||
android:strokeColor="#00000000"
|
||||
android:strokeWidth="1">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="78.5885"
|
||||
android:endY="90.9159"
|
||||
android:startX="48.7653"
|
||||
android:startY="61.0927"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
|
||||
android:strokeColor="#00000000"
|
||||
android:strokeWidth="1" />
|
||||
</vector>
|
||||
26
app/src/main/res/drawable/custom_toast.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle" >
|
||||
|
||||
<solid
|
||||
android:color="@color/primary_dark" >
|
||||
</solid>
|
||||
|
||||
<stroke
|
||||
android:width="2dp"
|
||||
android:color="@color/primary_light" >
|
||||
</stroke>
|
||||
|
||||
<padding
|
||||
android:left="5dp"
|
||||
android:top="5dp"
|
||||
android:right="5dp"
|
||||
android:bottom="5dp" >
|
||||
</padding>
|
||||
|
||||
<corners
|
||||
android:radius="11dp" >
|
||||
</corners>
|
||||
|
||||
</shape>
|
||||
74
app/src/main/res/drawable/ic_launcher_background.xml
Normal file
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector
|
||||
android:height="108dp"
|
||||
android:width="108dp"
|
||||
android:viewportHeight="108"
|
||||
android:viewportWidth="108"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#008577"
|
||||
android:pathData="M0,0h108v108h-108z"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
</vector>
|
||||
516
app/src/main/res/layout/activity_auton.xml
Normal file
@@ -0,0 +1,516 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/ScrollView01"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true"
|
||||
android:scrollbars="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/matchNumberHeading"
|
||||
android:textSize="12pt" />
|
||||
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:id="@+id/matchNumber_input_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginRight="18dp"
|
||||
android:hint="@string/matchNumberHeading"
|
||||
app:errorEnabled="true">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
android:id="@+id/matchNumber_input"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:id="@+id/teamNumber_input_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_marginRight="18dp"
|
||||
android:hint="@string/teamNumberHeading"
|
||||
app:errorEnabled="true">
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/teamNumberHeading"
|
||||
android:textSize="12pt" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/team_number_spinner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30pt"
|
||||
android:layout_weight="1"></Spinner>
|
||||
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/startingLocation_Header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="7dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/startingLocationHeading"
|
||||
android:textSize="12pt"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/starting_location"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30pt"
|
||||
android:layout_marginTop="8dp"
|
||||
android:entries="@array/startingLocation"
|
||||
android:spinnerMode="dropdown"
|
||||
android:visibility="gone" />
|
||||
|
||||
// Begin of High Power Port counters
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/AutoHigh_Header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="7dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/AutoHighHeading"
|
||||
android:textSize="12pt" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/AutoHighAttempt_Header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="7dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/AutoHighAttemptHeading"
|
||||
android:textSize="12pt" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/AutoHighMade_Header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="7dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/AutoHighMadeHeading"
|
||||
android:textSize="12pt" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/decrease_AutoHighAttempt"
|
||||
android:layout_width="30pt"
|
||||
android:layout_height="30pt"
|
||||
android:onClick="decreaseAutoHighAttemptInput"
|
||||
android:text="@string/minus" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/increase_AutoHighAttempt"
|
||||
android:layout_width="30pt"
|
||||
android:layout_height="30pt"
|
||||
android:onClick="increaseAutoHighAttemptInput"
|
||||
android:text="@string/plus" />
|
||||
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:id="@+id/auto_high_attempt_input_layout"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
app:errorEnabled="true"
|
||||
tools:ignore="UnknownId">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
android:id="@+id/auto_high_attempt_input"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:clickable="false"
|
||||
android:cursorVisible="false"
|
||||
android:enabled="true"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false"
|
||||
android:inputType="number" />
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:id="@+id/auto_high_made_layout"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:errorEnabled="true"
|
||||
tools:ignore="UnknownId">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
android:id="@+id/auto_high_made_input"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="false"
|
||||
android:cursorVisible="false"
|
||||
android:enabled="true"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false"
|
||||
android:inputType="number" />
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/decrease_teleop_cargo_in_cargo_ship"
|
||||
android:layout_width="30pt"
|
||||
android:layout_height="30pt"
|
||||
android:onClick="decreaseAutoHighMadeInput"
|
||||
android:text="@string/minus" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/increase_teleop_cargo_in_cargo_ship"
|
||||
android:layout_width="30pt"
|
||||
android:layout_height="30pt"
|
||||
android:onClick="increaseAutoHightMadeInput"
|
||||
android:text="@string/plus" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
//End of High Power Port counters
|
||||
|
||||
//Begin of Low Power Port counters
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/AutoLow_Header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="7dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/AutoLowHeading"
|
||||
android:textSize="12pt" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/AutoLowAttempt_Header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="7dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/AutoHighAttemptHeading"
|
||||
android:textSize="12pt" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/AutoLowhMade_Header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="7dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/AutoHighMadeHeading"
|
||||
android:textSize="12pt" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/decrease_AutoLowAttempt"
|
||||
android:layout_width="30pt"
|
||||
android:layout_height="30pt"
|
||||
android:onClick="decreaseAutoLowAttemptInput"
|
||||
android:text="@string/minus" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/increase_AutoLowAttempt"
|
||||
android:layout_width="30pt"
|
||||
android:layout_height="30pt"
|
||||
android:onClick="increaseAutoLowAttemptInput"
|
||||
android:text="@string/plus" />
|
||||
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:id="@+id/auto_low_attempt_input_layout"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
app:errorEnabled="true"
|
||||
tools:ignore="UnknownId">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
android:id="@+id/auto_low_attempt_input"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:clickable="false"
|
||||
android:cursorVisible="false"
|
||||
android:enabled="true"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false"
|
||||
android:inputType="number" />
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:id="@+id/auto_low_made_layout"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:errorEnabled="true"
|
||||
tools:ignore="UnknownId">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
android:id="@+id/auto_low_made_input"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="false"
|
||||
android:cursorVisible="false"
|
||||
android:enabled="true"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false"
|
||||
android:inputType="number" />
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/decrease_AutoLowMade"
|
||||
android:layout_width="30pt"
|
||||
android:layout_height="30pt"
|
||||
android:onClick="decreaseAutoLowMadeInput"
|
||||
android:text="@string/minus" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/increase_AutoLowMade"
|
||||
android:layout_width="30pt"
|
||||
android:layout_height="30pt"
|
||||
android:onClick="increaseAutoLowMadeInput"
|
||||
android:text="@string/plus" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/AutoTrap_Header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="7dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/AutoTrapHeading"
|
||||
android:textSize="12pt" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/AutoTrapAttempt_Header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="7dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/AutoHighAttemptHeading"
|
||||
android:textSize="12pt" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/AutoLowMade_Header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="7dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/AutoHighMadeHeading"
|
||||
android:textSize="12pt" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/decrease_AutoTrapAttempt"
|
||||
android:layout_width="30pt"
|
||||
android:layout_height="30pt"
|
||||
android:onClick="decreaseAutoTrapAttemptInput"
|
||||
android:text="@string/minus" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/increase_AutoTrapAttempt"
|
||||
android:layout_width="30pt"
|
||||
android:layout_height="30pt"
|
||||
android:onClick="increaseAutoTrapAttemptInput"
|
||||
android:text="@string/plus" />
|
||||
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:id="@+id/auto_trap_attempt_input_layout"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
app:errorEnabled="true"
|
||||
tools:ignore="UnknownId">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
android:id="@+id/auto_trap_attempt_input"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:clickable="false"
|
||||
android:cursorVisible="false"
|
||||
android:enabled="true"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false"
|
||||
android:inputType="number" />
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:id="@+id/auto_trap_made_layout"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:errorEnabled="true"
|
||||
tools:ignore="UnknownId">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
android:id="@+id/auto_trap_made_input"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="false"
|
||||
android:cursorVisible="false"
|
||||
android:enabled="true"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false"
|
||||
android:inputType="number" />
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/decrease_AutoTrapMade"
|
||||
android:layout_width="30pt"
|
||||
android:layout_height="30pt"
|
||||
android:onClick="decreaseAutoTrapMadeInput"
|
||||
android:text="@string/minus" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/increase_AutoTrapMade"
|
||||
android:layout_width="30pt"
|
||||
android:layout_height="30pt"
|
||||
android:onClick="increaseAutoTrapMadeInput"
|
||||
android:text="@string/plus" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
///End of Lower Power Port Counters
|
||||
|
||||
// Start of Initiation Line Question
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="@string/AutoMoveOffInitiationLineQuestion"
|
||||
android:textSize="10pt" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/auto_initiation_line"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:checkedButton="@id/AutoInitiationLine_yes"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/AutoInitiationLine_yes"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:text="@string/yes" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/AutoInitiationLine_no"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:text="@string/no" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
// End of Initiation Line Question
|
||||
|
||||
<Button
|
||||
android:id="@+id/next_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60pt"
|
||||
android:layout_marginTop="20dp"
|
||||
android:onClick="onShowTeleop"
|
||||
android:text="@string/nextButton"
|
||||
android:textSize="12pt" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</FrameLayout>
|
||||
137
app/src/main/res/layout/activity_main.xml
Normal file
@@ -0,0 +1,137 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/ScrollView01"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true"
|
||||
android:scrollbars="vertical">
|
||||
|
||||
<android.support.constraint.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/match_button"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="30pt"
|
||||
android:onClick="showMatch"
|
||||
android:text="@string/matchScouting"
|
||||
android:textSize="12pt"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/pit_button"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="30pt"
|
||||
android:onClick="showPit"
|
||||
android:textSize="12pt"
|
||||
android:text="@string/pitScouting"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/match_button"
|
||||
app:layout_constraintVertical_bias="0.0" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/send_data_button"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="30pt"
|
||||
android:onClick="sendData"
|
||||
android:textSize="12pt"
|
||||
android:text="@string/sendData"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/pit_button"
|
||||
app:layout_constraintVertical_bias="0.0" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/edit_teams_button"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="30pt"
|
||||
android:onClick="getTeams"
|
||||
android:text="@string/editTeams"
|
||||
android:textSize="12pt"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/send_data_button" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/TeamsLable"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="16pt"
|
||||
android:text="Loaded Teams"
|
||||
android:textColor="@color/colorPrimaryDark"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintTop_toBottomOf="@id/edit_teams_button"
|
||||
/>
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/TeamsScrollView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="180dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/TeamsLable"
|
||||
app:layout_constraintBottom_toTopOf="@id/textView"
|
||||
android:fillViewport="false"
|
||||
android:scrollbars="vertical">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/TeamsList"
|
||||
android:background="@color/colorPrimaryDark"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text = "No teams loaded"
|
||||
android:textColor = "@color/colorAccent"
|
||||
android:layout_margin="10dp"
|
||||
android:padding="10dp"
|
||||
/>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginBottom="25dp" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/Authors"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/mainAuthor"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/revisionDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/revisionDate"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</FrameLayout>
|
||||
602
app/src/main/res/layout/activity_pit.xml
Normal file
@@ -0,0 +1,602 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:focusableInTouchMode="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/ScrollView01"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true"
|
||||
android:scrollbars="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pit_teamNumber_input_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ems="10"
|
||||
android:text="@string/pitTeamNumberHeading"
|
||||
android:textSize="10pt" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/pit_team_number_spinner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30pt"
|
||||
android:layout_weight="1"
|
||||
tools:ignore="SpeakableTextPresentCheck" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/pitRobotWeightTextView"
|
||||
android:textSize="8pt" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/pit_robot_weight"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:autofillHints="Weight"
|
||||
android:hint="@string/pitRobotWeightHint"
|
||||
android:inputType="numberDecimal"
|
||||
android:minHeight="48dp" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pit_driveTrain_input_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ems="10"
|
||||
android:text="@string/pitDriveTrain"
|
||||
android:textSize="10pt" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/pit_drive_train_spinner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30pt"
|
||||
tools:ignore="SpeakableTextPresentCheck" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/drive_train_other"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/pitOther"
|
||||
android:textSize="10pt"
|
||||
android:visibility="invisible"
|
||||
android:inputType="text"
|
||||
android:importantForAutofill="no" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pit_programmingLanguage_input_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ems="10"
|
||||
android:text="@string/pitProgrammingLanguage"
|
||||
android:textSize="10pt" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/pit_programming_language_spinner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30pt"
|
||||
tools:ignore="SpeakableTextPresentCheck,SpeakableTextPresentCheck,SpeakableTextPresentCheck" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/programming_language_other"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/pitOther"
|
||||
android:textSize="10pt"
|
||||
android:visibility="invisible"
|
||||
android:inputType="text"
|
||||
android:autofillHints="" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="@string/pitAutoPrograms"
|
||||
android:textSize="10pt" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/pit_auto_programs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ems="10"
|
||||
android:gravity="start|top"
|
||||
android:inputType="textMultiLine"
|
||||
tools:ignore="SpeakableTextPresentCheck"
|
||||
android:autofillHints="" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="@string/pit_power_cell_pickup"
|
||||
android:textSize="10pt"
|
||||
android:textStyle="normal" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/pit_power_cell_pickup_radio_group"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:checkedButton="@id/power_cell_pickup_na"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/pit_power_cell_pickup_floor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/power_cell_pickup_floor_string" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/pit_power_cell_pickup_feed_station"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/power_cell_pickup_feed_station_text" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/pit_power_cell_pickup_either"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/power_cell_pickup_either_text" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/pit_power_cell_pickup_na"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/rating_na" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="@string/pitPowerPortShotQ"
|
||||
android:textSize="10pt" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/pit_shoot_target_zone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_weight="1"
|
||||
android:onClick="setStringShot"
|
||||
android:text="@string/tele_shoot_target_zone"
|
||||
tools:ignore="DuplicateSpeakableTextCheck" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/pit_shoot_field_front"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:minHeight="48dp"
|
||||
android:onClick="setStringShot"
|
||||
android:text="@string/tele_shoot_field_front"
|
||||
tools:ignore="DuplicateSpeakableTextCheck" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/pit_shoot_field_diagonal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_weight="1"
|
||||
android:minHeight="48dp"
|
||||
android:onClick="setStringShot"
|
||||
android:text="@string/tele_shoot_field_diagonal"
|
||||
tools:ignore="DuplicateSpeakableTextCheck,TouchTargetSizeCheck" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/pit_shoot_trench_near"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_weight="1"
|
||||
android:onClick="setStringShot"
|
||||
android:text="@string/tele_shoot_trench_near"
|
||||
tools:ignore="DuplicateSpeakableTextCheck" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/pit_shoot_other"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:onClick="setStringShot"
|
||||
android:text="@string/tele_shoot_other"
|
||||
android:visibility="visible" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/pit_shoot_trench_far"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:onClick="setStringShot"
|
||||
android:text="@string/tele_shoot_trench_far"
|
||||
android:visibility="invisible" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="@string/favoritShot"
|
||||
android:textSize="10pt"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<CheckBox
|
||||
android:id="@+id/pit_fav_target_zone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_weight="1"
|
||||
android:onClick="setStringFavShot"
|
||||
android:text="@string/tele_shoot_target_zone"/>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/pit_fav_field_front"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:minHeight="48dp"
|
||||
android:onClick="setStringFavShot"
|
||||
android:text="@string/tele_shoot_field_front" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/pit_fav_field_diagonal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:minHeight="48dp"
|
||||
android:onClick="setStringFavShot"
|
||||
android:text="@string/tele_shoot_field_diagonal"
|
||||
tools:ignore="TouchTargetSizeCheck" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<CheckBox
|
||||
android:id="@+id/pit_fav_trench_near"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_weight="1"
|
||||
android:onClick="setStringFavShot"
|
||||
android:text="@string/tele_shoot_trench_near"/>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/pit_fav_other"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:onClick="setStringFavShot"
|
||||
android:text="@string/tele_shoot_other"
|
||||
android:visibility="visible" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/pit_fav_trench_far"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:onClick="setStringFavShot"
|
||||
android:text="@string/tele_shoot_trench_far"
|
||||
android:visibility="invisible" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content" android:layout_marginTop="10dp"-->
|
||||
<!-- android:layout_marginBottom="10dp"-->
|
||||
<!-- android:text="@string/pitEndgameLocation"-->
|
||||
<!-- android:textSize="10pt"-->
|
||||
<!-- />-->
|
||||
<!-- <Spinner-->
|
||||
<!-- android:id="@+id/pit_end_game_location_spinner"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:scrollbarSize="30dp"-->
|
||||
<!-- android:layout_height="30dp">-->
|
||||
<!-- </Spinner>-->
|
||||
|
||||
/* <TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="@string/pitDriveThroughTrench"
|
||||
android:textSize="10pt"
|
||||
android:visibility="gone" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/pit_drive_thru_trench"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone" >
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/pit_drive_thru_trench_yes"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:text="@string/yes"
|
||||
android:visibility="gone" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/pit_drive_thru_trench_no"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:text="@string/no"
|
||||
android:visibility="gone" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="@string/pitShotLocation"
|
||||
android:textSize="10pt" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/pit_shot_location_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_weight="1"
|
||||
android:onClick="setPitShotLocationString"
|
||||
android:text="@string/pitShotLocationBottom" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/pit_shot_location_outer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:onClick="setPitShotLocationString"
|
||||
android:text="@string/pitShotLocationOuter"
|
||||
android:visibility="visible" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/pit_shot_location_inner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:minHeight="48dp"
|
||||
android:onClick="setPitShotLocationString"
|
||||
android:text="@string/pitShotLocationInner" />
|
||||
<CheckBox
|
||||
android:id="@+id/pit_shot_location_na"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="76dp"
|
||||
android:layout_weight="1"
|
||||
android:minHeight="48dp"
|
||||
android:onClick="setPitShotLocationString"
|
||||
android:text="@string/pitShotLocationNa" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="@string/pitControlPanel"
|
||||
android:textSize="10pt" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/pit_endgame_location"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/pit_endgame_hang_no"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Can't hang" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/pit_endgame_hang_alone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Can hang alone" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/pit_endgame_hang_one"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="1 Other Robot"
|
||||
/>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/pit_endgame_hang_two"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="2 Other Robots" />
|
||||
|
||||
</RadioGroup>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginTop="10dp"-->
|
||||
<!-- android:layout_marginBottom="10dp"-->
|
||||
<!-- android:text="@string/pitEndgameHang"-->
|
||||
<!-- android:textSize="10pt"-->
|
||||
<!-- android:visibility="gone" />-->
|
||||
|
||||
<!-- <RadioGroup-->
|
||||
<!-- android:id="@+id/pit_endgame_hang"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:orientation="horizontal">-->
|
||||
|
||||
<!-- <RadioButton-->
|
||||
<!-- android:id="@+id/pit_endgame_hang_yes"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginLeft="10dp"-->
|
||||
<!-- android:layout_marginRight="10dp"-->
|
||||
<!-- android:text="@string/yes"-->
|
||||
<!-- android:visibility="gone" />-->
|
||||
|
||||
<!-- <RadioButton-->
|
||||
<!-- android:id="@+id/pit_endgame_hang_no"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginLeft="10dp"-->
|
||||
<!-- android:layout_marginRight="10dp"-->
|
||||
<!-- android:text="@string/no"-->
|
||||
<!-- android:visibility="gone" />-->
|
||||
|
||||
<!-- </RadioGroup>-->
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="@string/pitGamePlan"
|
||||
android:textSize="10pt" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/pit_basic_plan"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:autofillHints="Other"
|
||||
android:hint="@string/pitOtherLabel"
|
||||
android:inputType="text"
|
||||
android:minHeight="48dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="@string/pit_fun_questions"
|
||||
android:textSize="15pt"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="@string/pit_robot_name"
|
||||
android:textSize="10pt"
|
||||
/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/pit_robot_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:autofillHints="Other"
|
||||
android:hint="@string/pit_robot_name_hint"
|
||||
android:inputType="text"
|
||||
android:minHeight="48dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/scouterInitials"
|
||||
android:textSize="10pt" />
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/scouterInitials_input"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:autofillHints="Initials"
|
||||
android:hint="@string/scouterInitials"
|
||||
android:inputType="text"
|
||||
android:minHeight="48dp"
|
||||
android:textColorHint="#0277BD"
|
||||
tools:ignore="DuplicateSpeakableTextCheck,TextContrastCheck" />
|
||||
|
||||
<Button
|
||||
android:visibility="invisible"
|
||||
android:id="@+id/take_photo_btn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80pt"
|
||||
android:onClick="takePhoto"
|
||||
android:text="@string/takePhotoButton"
|
||||
android:textSize="12pt" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/save_pit_btn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30pt"
|
||||
android:onClick="savePitData"
|
||||
android:text="@string/savePitButton"
|
||||
android:textSize="12pt" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ems="10"
|
||||
android:gravity="start|top"
|
||||
android:inputType="textMultiLine"
|
||||
tools:ignore="SpeakableTextPresentCheck"
|
||||
android:autofillHints="" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
62
app/src/main/res/layout/activity_scouter_initials.xml
Normal file
@@ -0,0 +1,62 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/ScrollView01"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true"
|
||||
android:scrollbars="vertical">
|
||||
|
||||
<android.support.constraint.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:id="@+id/scouterInitials_input_layout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="18dp"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_marginRight="18dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:hint="@string/scouterInitials"
|
||||
app:errorEnabled="true"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
android:id="@+id/scouterInitials_input"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="text"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/submitInitials_btn"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="12pt"
|
||||
android:onClick="submitInitials"
|
||||
android:text="@string/submitInitials"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/scouterInitials_input_layout"
|
||||
app:layout_constraintVertical_bias="0.0" />
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</FrameLayout>
|
||||
63
app/src/main/res/layout/activity_send_data.xml
Normal file
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<Button
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp"
|
||||
android:text="@string/sendMatchData"
|
||||
android:onClick="sendMatchData"
|
||||
android:textSize="12pt"/>
|
||||
|
||||
<Button
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp"
|
||||
android:text="@string/sendPitData"
|
||||
android:onClick="sendPitData"
|
||||
android:textSize="12pt"/>
|
||||
|
||||
<Button
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp"
|
||||
android:text="@string/sendRobotPhotosText"
|
||||
android:onClick="sendRobotPhotos"
|
||||
android:textSize="12pt"/>
|
||||
<!--
|
||||
<Button
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/concatenateDataText"
|
||||
android:onClick="concatenateData"/>
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/matchOrPit_RadiobtnGrp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/match_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/concatenateMatch" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/pit_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/concatenatePit" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
<EditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/concatFolder_editText"
|
||||
android:text="@string/concatFolderEditTextValue"
|
||||
android:hint="@string/concatFolder" />
|
||||
-->
|
||||
</LinearLayout>
|
||||
1463
app/src/main/res/layout/activity_teleop.xml
Normal file
19
app/src/main/res/layout/custom_toast.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
android:id="@+id/root"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/custom_toast">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/message"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="12dp"
|
||||
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:textColor="@color/primary_light"
|
||||
android:textSize="32sp" />
|
||||
|
||||
</LinearLayout>
|
||||
6
app/src/main/res/menu/main_menu.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@+id/main_activity"
|
||||
android:title="Return Home" />
|
||||
<item android:id="@+id/send_data"
|
||||
android:title="Send Data"/>
|
||||
</menu>
|
||||
5
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background"/>
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
||||
5
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background"/>
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
||||
BIN
app/src/main/res/mipmap-hdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 8.4 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 8.8 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
9
app/src/main/res/values/colors.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#317ac7</color>
|
||||
<color name="colorPrimaryDark">#094A8D</color>
|
||||
<color name="colorAccent">#33b850</color>
|
||||
<color name="white">#ffffff</color>
|
||||
<color name="primary_dark">#33b850</color>
|
||||
<color name="primary_light">#317ac7</color>
|
||||
</resources>
|
||||
4
app/src/main/res/values/ids.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
</resources>
|
||||
399
app/src/main/res/values/strings.xml
Normal file
@@ -0,0 +1,399 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">Scouting 2024 Crescendo</string>
|
||||
|
||||
<string name="sendData">Send Data</string>
|
||||
<string name="submitInitials">Submit</string>
|
||||
|
||||
<string name="mainAuthor">Authors 1918 Scouting</string>
|
||||
|
||||
<string name="revisionDate">Revised 1/23/2024</string>
|
||||
|
||||
<string name="concatenateMatch">Concatenate Match</string>
|
||||
<string name="concatenatePit">Concatenate Pit</string>
|
||||
<string name="concatFolder">Enter concatenation folder name</string>
|
||||
<string name="concatFolderEditTextValue">Scouting</string>
|
||||
<string name="concatenateDataText">concatenateData</string>
|
||||
<string name="sendRobotPhotosText">Send Robot Photos</string>
|
||||
<string name="sendPitData">Send Pit Data</string>
|
||||
<string name="sendMatchData">Send Match Data</string>
|
||||
|
||||
<!-- Button Strings -->
|
||||
|
||||
<string name="minus">-</string>
|
||||
<string name="plus">+</string>
|
||||
|
||||
<!--Auton Strings-->
|
||||
|
||||
<string name="teamNumberHeading">Team Number</string>
|
||||
<string name="matchNumberHeading">Match Number</string>
|
||||
<string name="startingLocationHeading">Starting Location (relative to the Power Port)</string>
|
||||
<string name="movedOffHab">Moved off Hab?</string>
|
||||
<string name="movedOffHabNo">No</string>
|
||||
<string name="movedOffHabYes">Yes</string>
|
||||
<string name="playStyleHeading">How did the team play during SandStorm?</string>
|
||||
|
||||
<string name="HintA">Cargo Ship: Hatch Panel</string>
|
||||
|
||||
<string name="HintB">Cargo Ship: Cargo</string>
|
||||
<string name="HintC">Rocket: Lower Level Hatch Panel</string>
|
||||
<string name="HintD">Rocket: Lower Level Cargo</string>
|
||||
<string name="HintE">Rocket: Middle Level Hatch Panel</string>
|
||||
<string name="HintF">Rocket: Middle Level Cargo</string>
|
||||
<string name="HintG">Rocket: Upper Level Hatch Panel</string>
|
||||
<string name="HintH">Rocket: Upper Level Cargo</string>
|
||||
<string name="saveButton">Save</string>
|
||||
<string name="teamNumberError">Enter in team number</string>
|
||||
|
||||
<string name="matchNumberError">Enter in match number</string>
|
||||
|
||||
|
||||
<!--Auton Error Strings-->
|
||||
|
||||
<string name="startingLocationError">Enter starting location</string>
|
||||
<string name="cargoShipTitle">Cargo Ship</string>
|
||||
<string name="rocketShipTitle">Rocket Ship</string>
|
||||
|
||||
<!--Teleop Strings-->
|
||||
|
||||
<string name="hatchPanelsOnCargoShip">Hatch Panels on Cargo Ship</string>
|
||||
<string name="cargoInCargoShip">Cargo in Cargo Ship</string>
|
||||
<string name="hatchPanelTop">Hatch Panel Top</string>
|
||||
<string name="hatchPanelMiddle">Hatch Panel Middle</string>
|
||||
<string name="hatchPanelBottom">Hatch Panel Bottom</string>
|
||||
<string name="cargoTop">Cargo Top</string>
|
||||
<string name="cargoMiddle">Cargo Middle</string>
|
||||
<string name="cargoBottom">Cargo Bottom</string>
|
||||
<string name="endgameHeading">Where was the robot at end game? (select from drop down)</string>
|
||||
<string name="generalInfoHeading">General Info</string>
|
||||
|
||||
<string name="cycle_time_heading">How did the robot interact with the Control Panel?</string>
|
||||
<string name="over_all_Effectiveness_heading">Rate the overall effectiveness of the robot during the match (1 = BAD, 5 = Excellent).</string>
|
||||
<string name="trained_drive_team_heading">How trained did the drive team look (1 = BAD, 5 = Excellent)?</string>
|
||||
<string name="over_all_placement">Rate the overall placement of cargo and hatch panels</string>
|
||||
<string name="observ_average_speed">Average Speed</string>
|
||||
|
||||
<string name="observ_dropped_hatches">Dropped a lot of hatches</string>
|
||||
<string name="observ_dropped_cargo">Dropped a lot of cargo</string>
|
||||
<string name="observ_hard_time_hatches">Had a hard time placing hatches</string>
|
||||
<string name="observ_hard_time_cargo">Had a hard time placing cargo</string>
|
||||
<string name="hatch_pickup">How did the robot pick up hatch panels?</string>
|
||||
<string name="cargo_pickup">How did the robot pick up cargo?</string>
|
||||
<string name="hatch_panel_pickup_na">N/A</string>
|
||||
<string name="hatch_panel_pickup_port">At the port</string>
|
||||
<string name="hatch_panel_pickup_floor">Off the floor</string>
|
||||
<string name="cargo_pickup_na">N/A</string>
|
||||
<string name="cargo_pickup_port">At the port</string>
|
||||
<string name="cargo_pickup_floor">Off the floor</string>
|
||||
<string name="robotObservations">Robot Observations</string>
|
||||
<string name="summaryHeading">In summary what did the robot do well?</string>
|
||||
<string name="issuesHeading">List any issues the robot had.</string>
|
||||
<string name="issues">Enter Issues here</string>
|
||||
<string name="summary">Enter Summary Here</string>
|
||||
<string name="observ_fast">Fast</string>
|
||||
<string name="observ_slow">Slow</string>
|
||||
|
||||
<!-- Observation strings -->
|
||||
<string name="observ_jerky">Jerky</string>
|
||||
<string name="observ_smooth">Smooth</string>
|
||||
<string name="observ_fell_over">Fell Over</string>
|
||||
<string name="observ_died_mid">Died during match</string>
|
||||
<string name="observ_died_back">Died but came back</string>
|
||||
<string name="observ_penalties">Got lots of penalties</string>
|
||||
<string name="observ_fell_apart">Robot fell apart</string>
|
||||
<string name="observ_played_defense">Played defense most of the match</string>
|
||||
<string name="observ_not_much">Didn\'t do much</string>
|
||||
<string name="observ_hatch_pickup">Had hard time picking up hatch panels</string>
|
||||
<string name="observ_cargo_pickup">Had hard time picking up notes</string>
|
||||
<string name="observ_slowed_by_robot">Had defense played against them</string>
|
||||
<string name="observ_dns">Didn\'t show up</string>
|
||||
<string name="defenseQuestion">How effective was the robot\'s defense?</string>
|
||||
<string name="counterDefenseQuestion">If the robot played counter defense, rate the level of counter defense.</string>
|
||||
<string name="observ_power_cell_pickup">Had a hard time picking up Notes</string>
|
||||
<string name="observ_stuck_in_intake">Note stuck in intake</string>
|
||||
|
||||
|
||||
<!-- Defense / Counter Defense strings -->
|
||||
<string name="defendedQuestion">How effective was the robot while being defended?</string>
|
||||
<string name="defense_shut_down">Shut Down</string>
|
||||
<string name="defense_slow_down">Slowed Down</string>
|
||||
|
||||
<string name="defense_not_effective">Not Effective</string>
|
||||
<string name="defense_not_effected">Not Effected</string>
|
||||
<string name="type_of_bot">Type of Bot</string>
|
||||
<string name="climbingHeading">Climb</string>
|
||||
|
||||
|
||||
<!-- Type of Bot Strings -->
|
||||
|
||||
<string name="successClimb">Success</string>
|
||||
|
||||
<string name="failClimb">Fail</string>
|
||||
|
||||
|
||||
<string name="noClimb">N/A</string>
|
||||
<string name="climbTimeHeading">Climb Time once underneath the Stage</string>
|
||||
<string name="climb_fast">0 - 10 seconds</string>
|
||||
<string name="climb_medium">11 - 19 seconds</string>
|
||||
|
||||
<!-- Climb strings -->
|
||||
|
||||
<string name="climb_slow">20 + seconds</string>
|
||||
<string name="climb_na">N/A</string>
|
||||
<string name="abilityToHelpClimbHeading">Can help others climb</string>
|
||||
<string name="ableToHelpClimb">Yes</string>
|
||||
<string name="unableToHelpClimb">No</string>
|
||||
|
||||
<string name="onPlatformHeading">On platform</string>
|
||||
<string name="isOnPlatform">Success</string>
|
||||
<string name="isNotOnPlatform">Fail</string>
|
||||
|
||||
<string name="notAttemptedPlatform">N/A</string>
|
||||
<string name="defenseHeading">Defense</string>
|
||||
<string name="effectiveDefense">Effective</string>
|
||||
<string name="ineffectiveDefense">Ineffective</string>
|
||||
|
||||
<string name="receivedFoulsDefense">Fouled</string>
|
||||
<string name="noDefense">N/A</string>
|
||||
<string name="fouls">Fouls</string>
|
||||
<string name="nextButton">Move To Teleop</string>
|
||||
<string name="scouterInitials">Scouter Initials</string>
|
||||
|
||||
|
||||
|
||||
<!-- Rating Scale -->
|
||||
<string name="rating_0">0</string>
|
||||
<string name="rating_1">1</string>
|
||||
<string name="rating_2">2</string>
|
||||
<string name="rating_3">3</string>
|
||||
<string name="rating_4">4</string>
|
||||
<string name="rating_5">5</string>
|
||||
<string name="rating_6">6</string>
|
||||
<string name="rating_7">7</string>
|
||||
<string name="rating_8">8</string>
|
||||
<string name="rating_9">9</string>
|
||||
<string name="rating_10">10</string>
|
||||
<string name="rating_na">N/A</string>
|
||||
<string name="matchScouting">Match</string>
|
||||
<string name="pitScouting">Pit</string>
|
||||
<string name="pitTeamNumberHeading">Team Number</string>
|
||||
|
||||
<!-- yes / no / na-->
|
||||
<string name="yes">Yes</string>
|
||||
<string name="no">No</string>
|
||||
<string name="na">NA</string>
|
||||
|
||||
<!--Menu Strings-->
|
||||
<string name="pitRobotWeightHint">Robot Weight</string>
|
||||
<string name="pitDriveTrain">Drive Train</string>
|
||||
|
||||
<!--Pit Scouting Strings-->
|
||||
<string name="pitProgrammingLanguage">Programming Language</string>
|
||||
<string name="pitStartingHabPositionText">On what habitat platform do you prefer to start from?</string>
|
||||
<string name="pitPreLoadText">What game piece do you preload?</string>
|
||||
<string name="robotPreLoadText">What game piece was preloaded?</string>
|
||||
<string name="pitHatch">Hatch panel</string>
|
||||
<string name="pitCargo">Cargo</string>
|
||||
<string name="pitNothing">Nothing</string>
|
||||
<string name="pitPowerPortShotQ">Where on the field can your robot take Speaker shots from?</string>
|
||||
<string name="pitPowerPortNa">NA</string>
|
||||
<string name="pitPowerPortShotInner">Inner Port</string>
|
||||
<string name="pitPowerPortShotOuter">Outer Port</string>
|
||||
<string name="pitPowerPortShotBottom">Bottom Port</string>
|
||||
<string name="pitHatchPanels">Where does your robot place hatch panels?</string>
|
||||
<string name="pitCargoShip">Cargo Ship</string>
|
||||
<string name="pitRocketBottom">Rocket-Bottom</string>
|
||||
<string name="pitRocketMiddle">Rocket-middle</string>
|
||||
<string name="pitRocketTop">Rocket-top</string>
|
||||
<string name="pitNA">N/A</string>
|
||||
<string name="pitCargoPlacement">Where does your robot place cargo?</string>
|
||||
<string name="pitEndgame">What does your robot do at endgame?</string>
|
||||
<string name="pitCargoShipText">What do you place on the cargo ship before the match?</string>
|
||||
<string name="pitPreMatchCargo">Cargo</string>
|
||||
<string name="pitPreMatchHatch">Hatch Panel</string>
|
||||
<string name="pitPreMatchNothing">Nothing</string>
|
||||
<string name="pitOtherLabel">Basic plan</string>
|
||||
<string name="powerCellPreLoad">How many power cells do you preload your robot with for Auto?</string>
|
||||
<string name="defenseInPerimeterYes">Yes</string>
|
||||
<string name="defenseInPerimeterNo">No</string>
|
||||
<string name="cycleSuperFast">Spun 3-5 times</string>
|
||||
<string name="cycleFast">Set to color</string>
|
||||
<string name="cycleMedium">Both</string>
|
||||
<string name="pit_power_cell_pickup">Where can the robot get Notes?</string>
|
||||
<string name="pit_fun_questions">Fun Questions</string>
|
||||
<string name="pit_robot_name">Does Your Robot Have A Name? If so, What is it?</string>
|
||||
<string name="pit_robot_name_hint">Robot Name (Leave Blank if None)</string>
|
||||
|
||||
|
||||
<!-- Team Numbers drop down array -->
|
||||
<string name="cycleSlow">Attempted but failed</string>
|
||||
|
||||
|
||||
<!-- Programming drop down array -->
|
||||
<string name="cycleNa">N/A</string>
|
||||
|
||||
<!-- Drive Train drop down array -->
|
||||
<string name="pitJava">Java</string>
|
||||
|
||||
<!-- Hab Platform drop down array -->
|
||||
<string name="pitCpp">C++</string>
|
||||
|
||||
<string name="pitLabview">LabVIEW</string>
|
||||
|
||||
<string name="pitOther">Other</string>
|
||||
|
||||
<!-- cycle time Array -->
|
||||
|
||||
<string name="pitRobotWeightTextView">How much does your robot weigh?</string>
|
||||
|
||||
<string name="pitRobotArcadeGame">What old arcade game would your robot be in?</string>
|
||||
<string name="savePitButton">Save</string>
|
||||
<string name="takePhotoButton">Take Photo</string>
|
||||
<string name="pitTeamNumberError">Select a team number</string>
|
||||
<string name="pitProgrammingLanguageError">Enter Programming Language</string>
|
||||
|
||||
<string name="robotNameError">Enter Robot Name</string>
|
||||
<string name="pitRobotWeightError">Enter Robot Weight</string>
|
||||
<string name="teleopCargoShipHatchPanelError">Enter Cargo Ship Hatch Panels</string>
|
||||
<string name="teleopCargoInCargoShipError">Enter Cargo Ship Cargo</string>
|
||||
<string name="hatchPanelTopError">Enter Top HatchPanels</string>
|
||||
<string name="hatchPanelMiddleError">Enter Middle Hatch Panels</string>
|
||||
<string name="hatchPanelBottomError">Enter Bottom Hatch Panels</string>
|
||||
|
||||
<string name="cargoTopError">Enter Top Cargo</string>
|
||||
|
||||
<!-- Pit Error Strings -->
|
||||
<string name="cargoMiddleError">Enter Middle Cargo</string>
|
||||
<string name="cargoBottomError">Enter Bottom Cargo</string>
|
||||
<string name="scouterInitialsError">Enter Scouter Initials</string>
|
||||
<string name="hatch_panel_pickup_both">Both</string>
|
||||
|
||||
<!-- Teleop Error Strings -->
|
||||
<string name="cargo_pickup_both">Both</string>
|
||||
<string name="editTeams">Import TEAMS</string>
|
||||
<string name="pitInitLineAuton">Does your robot move from the Alliance initiation line during auton</string>
|
||||
<string name="pitDriveThroughTrench">Can your robot drive through the trench?</string>
|
||||
<string name="pitEndgameLocation">Can your robot hang in endgame? If so, with how many other robots?"</string>
|
||||
<string name="pitShotLocation">Where can your robot score Notes?</string>
|
||||
<string name="pitShotLocationNa">N/A</string>
|
||||
<string name="pitShotLocationInner">Speaker</string>
|
||||
<string name="pitShotLocationOuter">Amp</string>
|
||||
<string name="pitShotLocationBottom">Trap</string>
|
||||
<string name="pitControlPanel">If your robot hangs, can it hang with multiple robots?</string>
|
||||
<string name="pitControlPanelRotate3to5">Can hang alone</string>
|
||||
<string name="pitControlPanelPosition">Can hang with one other robot</string>
|
||||
<string name="pitControlPanelNothing">Can hang with two other robots</string>
|
||||
<string name="pitGamePlan">What is your basic game plan during teleop?</string>
|
||||
<string name="HighAttemptHint">Missed</string>
|
||||
<string name="AutoPowerPortCounterHeading">Made</string>
|
||||
<string name="AutoHighAttemptHeading">Missed</string>
|
||||
<string name="AutoHighMadeHeading">Made</string>
|
||||
<string name="AutoHighHeading">Speaker</string>
|
||||
<string name="AutoLowHeading">Amp</string>
|
||||
<string name="AutoTrapHeading">Trap</string>
|
||||
<string name="AutoMoveOffInitiationLineQuestion">Did the robot\'s bumpers move completely out of the Starting Zone?</string>
|
||||
<string name="defense_rating">If the robot played defense, rate the level of defense.</string>
|
||||
<string name="over_all_effectiveness_rating">Rate the overall effectiveness of the robot during the match.</string>
|
||||
<string name="power_cell_placement_rating">Rate the overall cargo placement (1 = BAD, 5 = Excellent).</string>
|
||||
<string name="controlPanelRating">How good was the team with the control panel (1 = BAD, 5 = Excellent)?</string>
|
||||
<string name="controlPanelIssue">Knocked a robot off the Stage</string>
|
||||
<string name="hungUpPowerCell">Missed Cargo mostly bounced out</string>
|
||||
<string name="fellGenSwitch">Shot the wrong cargo into the hub</string>
|
||||
<string name="hungUpfloor">Fell while climbing</string>
|
||||
<string name="power_cell_pickup">Where did the robot get Notes?</string>
|
||||
<string name="power_cell_pickup_floor_string">Floor pickup</string>
|
||||
<string name="power_cell_pickup_feed_station_text">Human Player Station</string>
|
||||
<string name="power_cell_pickup_either_text">Both</string>
|
||||
<string name="under_trench">Did the robot go under the trench?</string>
|
||||
<string name="low_port_dump">Did the Robot dump all balls into the Low Power Port at once?</string>
|
||||
<string name="TypeOfRobot">Type of Bot</string>
|
||||
<string name="high_shooter">Speaker scorer</string>
|
||||
<string name="low_shooter">Amp scorer</string>
|
||||
<string name="trap_scorer">Trap scorer</string>
|
||||
<string name="feeder_bot">Feeder bot</string>
|
||||
<string name="control_panel">Control panel bot</string>
|
||||
<string name="defense_bot">Defense bot</string>
|
||||
<string name="counter_defense_bot">Counter defense bot</string>
|
||||
<string name="WhereShotFrom">Where did the robot take Speaker shots from?</string>
|
||||
<string name="tele_shoot_target_zone">Against the Subwoofer</string>
|
||||
<string name="tele_shoot_field_front">From the Amp Zone</string>
|
||||
<string name="tele_shoot_field_diagonal">From the base of the Stage</string>
|
||||
<string name="tele_shoot_trench_near">From the Starting Zone</string>
|
||||
<string name="tele_shoot_trench_far">In the Trench in front of the Control Panel</string>
|
||||
<string name="tele_shoot_other">From outside the Starting Zone</string>
|
||||
<string name="favoritShot">Where is your robot\'s favorite shot to take?</string>
|
||||
<string name="pitAutoPrograms">What are your robot\'s autonomous programs?</string>
|
||||
<string name="post_match_observations">Post-Match Observations</string>
|
||||
|
||||
<string-array name="startingLocation">
|
||||
<item> </item>
|
||||
<item>In Front</item>
|
||||
<item>Diagonal on Home Trench side</item>
|
||||
<item>Diagonal away from Home Trench side</item>
|
||||
|
||||
</string-array>
|
||||
<string-array name="playStyle">
|
||||
<item> </item>
|
||||
<item>Autonomous</item>
|
||||
<item>Driver-Operated</item>
|
||||
<item>Didn\'t Move</item>
|
||||
|
||||
</string-array>
|
||||
<string-array name="bot_type_array">
|
||||
<item></item>
|
||||
<item>Offense great scorer (10+ elements)</item>
|
||||
<item>Offense medium scorer (6-9 elements)</item>
|
||||
<item>Offense low scorer (5 or less elements)</item>
|
||||
<item>Defense (go to other side of field)</item>
|
||||
<item>Counter defense (protect own alliance)</item>
|
||||
<item>Utility (play some offense, some defense)</item>
|
||||
<item>Missing or died</item>
|
||||
|
||||
</string-array>
|
||||
|
||||
<string-array name="programmingLanguages">
|
||||
<item>C++</item>
|
||||
<item>Java</item>
|
||||
<item>LabView</item>
|
||||
<item>Python</item>
|
||||
<item>Other</item>
|
||||
</string-array>
|
||||
<string-array name="driveTrain">
|
||||
<item>Arcade</item>
|
||||
<item>Mechanum</item>
|
||||
<item>Swerve</item>
|
||||
<item>Tank</item>
|
||||
<item>West Coast</item>
|
||||
<item>Other</item>
|
||||
</string-array>
|
||||
<string-array name="habPlatform">
|
||||
<item>Lowest deck</item>
|
||||
<item>Middle deck</item>
|
||||
<item>Highest deck</item>
|
||||
</string-array>
|
||||
<string-array name="endgame">
|
||||
<item>Cargo</item>
|
||||
<item>Hatch Panel</item>
|
||||
<item>Nothing</item>
|
||||
</string-array>
|
||||
<string-array name="endgame_location">
|
||||
<item> </item>
|
||||
<item>Parked</item>
|
||||
<item>Onstage Alone</item>
|
||||
<item>Onstage With One Other Robot</item>
|
||||
<item>Onstage With Two Other Robots</item>
|
||||
<item>Outside the Stage</item>
|
||||
</string-array>
|
||||
<string-array name="cycle_time_spinner">
|
||||
|
||||
<item> </item>
|
||||
<item>Less than 5 seconds</item>
|
||||
<item>5 to 10 Seconds</item>
|
||||
<item>10 to 15 Seconds</item>
|
||||
<item>20 + Seconds</item>
|
||||
<item>N/A</item>
|
||||
|
||||
</string-array>
|
||||
|
||||
|
||||
</resources>
|
||||
12
app/src/main/res/values/styles.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
</style>
|
||||
|
||||
|
||||
</resources>
|
||||
4
app/src/main/res/xml/provider_paths.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<paths xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="0dp" android:layout_width="0dp">
|
||||
<external-path name="external_files" path="."/>
|
||||
</paths>
|
||||