added check box screen
This commit is contained in:
@@ -58,6 +58,7 @@ dependencies {
|
|||||||
implementation(libs.fragment)
|
implementation(libs.fragment)
|
||||||
implementation(libs.lifecycle.livedata.ktx)
|
implementation(libs.lifecycle.livedata.ktx)
|
||||||
implementation(libs.lifecycle.viewmodel.ktx)
|
implementation(libs.lifecycle.viewmodel.ktx)
|
||||||
|
implementation(libs.play.services.tflite.support)
|
||||||
implementation(libs.viewpager2)
|
implementation(libs.viewpager2)
|
||||||
// Desugaring & MultiDex
|
// Desugaring & MultiDex
|
||||||
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5")
|
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5")
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
package com.example.generator;
|
package com.example.generator;
|
||||||
|
|
||||||
|
import com.google.android.gms.tflite.support.Empty;
|
||||||
|
|
||||||
|
import java.lang.reflect.Array;
|
||||||
|
|
||||||
public class Data {
|
public class Data {
|
||||||
private String base64;
|
private String base64;
|
||||||
private int numPos;
|
private int numPos;
|
||||||
@@ -27,10 +31,22 @@ public class Data {
|
|||||||
private String ScoreOb8;
|
private String ScoreOb8;
|
||||||
private String ScoreOb9;
|
private String ScoreOb9;
|
||||||
private String NumScoreOb = "0";
|
private String NumScoreOb = "0";
|
||||||
private int[] NumButtonObAuto = new int[9];
|
private int[] NumButtonObAuto = new int[0];
|
||||||
private int[] NumButtonObTeleop = new int[9];
|
private int[] NumButtonObTeleop = new int[0];
|
||||||
private int[] valueButtonsAuto = new int[81];
|
private int[] valueButtonsAuto = new int[0];
|
||||||
private int[] valueButtonsTele = new int[81];
|
private int[] valueButtonsTele = new int[0];
|
||||||
|
|
||||||
|
private int numCheckBoxes;
|
||||||
|
|
||||||
|
private String CheckBox1;
|
||||||
|
|
||||||
|
private String CheckBox2;
|
||||||
|
|
||||||
|
private String CheckBox3;
|
||||||
|
|
||||||
|
private String CheckBox4;
|
||||||
|
|
||||||
|
|
||||||
public String getBase64() {
|
public String getBase64() {
|
||||||
return base64;
|
return base64;
|
||||||
}
|
}
|
||||||
@@ -230,5 +246,46 @@ public class Data {
|
|||||||
return NumButtonObTeleop;
|
return NumButtonObTeleop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setNumCheckBoxes(int numCheckBoxes) {
|
||||||
|
this.numCheckBoxes = numCheckBoxes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getNumCheckBoxes() {
|
||||||
|
return numCheckBoxes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCheckBox1(String CheckBox1) {
|
||||||
|
this.CheckBox1 = CheckBox1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCheckBox1() {
|
||||||
|
return CheckBox1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCheckBox2(String CheckBox2) {
|
||||||
|
this.CheckBox2 = CheckBox2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCheckBox2() {
|
||||||
|
return CheckBox2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCheckBox3(String CheckBox3) {
|
||||||
|
this.CheckBox3 = CheckBox3;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCheckBox3() {
|
||||||
|
return CheckBox3;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCheckBox4(String CheckBox4) {
|
||||||
|
this.CheckBox4 = CheckBox4;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCheckBox4() {
|
||||||
|
return CheckBox4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -99,16 +99,11 @@ public class MakeCheckActivity extends AppCompatActivity {
|
|||||||
});
|
});
|
||||||
|
|
||||||
nextButton.setOnClickListener((v) -> {
|
nextButton.setOnClickListener((v) -> {
|
||||||
EventsActivity.Data.setScoreOb1(Ob1.getText().toString());
|
EventsActivity.Data.setCheckBox1(Ob1.getText().toString());
|
||||||
EventsActivity.Data.setScoreOb2(Ob2.getText().toString());
|
EventsActivity.Data.setCheckBox2(Ob2.getText().toString());
|
||||||
EventsActivity.Data.setScoreOb3(Ob3.getText().toString());
|
EventsActivity.Data.setCheckBox3(Ob3.getText().toString());
|
||||||
EventsActivity.Data.setScoreOb4(Ob4.getText().toString());
|
EventsActivity.Data.setCheckBox4(Ob4.getText().toString());
|
||||||
EventsActivity.Data.setScoreOb5(Ob5.getText().toString());
|
EventsActivity.Data.setNumCheckBoxes(ScoreObjects.getText().toString().isEmpty() ? 0 : Integer.parseInt(ScoreObjects.getText().toString()));
|
||||||
EventsActivity.Data.setScoreOb6(Ob6.getText().toString());
|
|
||||||
EventsActivity.Data.setScoreOb7(Ob7.getText().toString());
|
|
||||||
EventsActivity.Data.setScoreOb8(Ob8.getText().toString());
|
|
||||||
EventsActivity.Data.setScoreOb9(Ob9.getText().toString());
|
|
||||||
EventsActivity.Data.setNumScoreOb(ScoreObjects.getText().toString());
|
|
||||||
Intent intent = new Intent(this, MakeAutoActivity2.class);
|
Intent intent = new Intent(this, MakeAutoActivity2.class);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ annotation = "1.10.0"
|
|||||||
lifecycleLivedataKtx = "2.11.0"
|
lifecycleLivedataKtx = "2.11.0"
|
||||||
lifecycleViewmodelKtx = "2.11.0"
|
lifecycleViewmodelKtx = "2.11.0"
|
||||||
fragment = "1.8.9"
|
fragment = "1.8.9"
|
||||||
|
playServicesTfliteSupport = "16.5.0"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
junit = { group = "junit", name = "junit", version.ref = "junit" }
|
junit = { group = "junit", name = "junit", version.ref = "junit" }
|
||||||
@@ -31,6 +32,7 @@ annotation = { group = "androidx.annotation", name = "annotation", version.ref =
|
|||||||
lifecycle-livedata-ktx = { group = "androidx.lifecycle", name = "lifecycle-livedata-ktx", version.ref = "lifecycleLivedataKtx" }
|
lifecycle-livedata-ktx = { group = "androidx.lifecycle", name = "lifecycle-livedata-ktx", version.ref = "lifecycleLivedataKtx" }
|
||||||
lifecycle-viewmodel-ktx = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "lifecycleViewmodelKtx" }
|
lifecycle-viewmodel-ktx = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "lifecycleViewmodelKtx" }
|
||||||
fragment = { group = "androidx.fragment", name = "fragment", version.ref = "fragment" }
|
fragment = { group = "androidx.fragment", name = "fragment", version.ref = "fragment" }
|
||||||
|
play-services-tflite-support = { group = "com.google.android.gms", name = "play-services-tflite-support", version.ref = "playServicesTfliteSupport" }
|
||||||
|
|
||||||
[plugins]
|
[plugins]
|
||||||
android-application = { id = "com.android.application", version.ref = "agp" }
|
android-application = { id = "com.android.application", version.ref = "agp" }
|
||||||
|
|||||||
Reference in New Issue
Block a user