added stuff
This commit is contained in:
4
.idea/caches/deviceStreaming.xml
generated
4
.idea/caches/deviceStreaming.xml
generated
@@ -1380,8 +1380,8 @@
|
||||
<option name="manufacturer" value="Samsung" />
|
||||
<option name="name" value="Galaxy Tab A9+" />
|
||||
<option name="screenDensity" value="240" />
|
||||
<option name="screenX" value="1200" />
|
||||
<option name="screenY" value="1920" />
|
||||
<option name="screenX" value="800" />
|
||||
<option name="screenY" value="1280" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="36" />
|
||||
|
||||
42
.idea/workspace.xml
generated
42
.idea/workspace.xml
generated
@@ -4,9 +4,7 @@
|
||||
<option name="autoReloadType" value="NONE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="e6962293-3789-4c0b-8e8d-572b4ba78f5f" name="Changes" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/ScoutingApp/local.properties" beforeDir="false" afterPath="$PROJECT_DIR$/ScoutingApp/local.properties" afterDir="false" />
|
||||
</list>
|
||||
<list default="true" id="e6962293-3789-4c0b-8e8d-572b4ba78f5f" name="Changes" comment="" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
@@ -18,16 +16,16 @@
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="GitHubPullRequestSearchHistory"><![CDATA[{
|
||||
"lastFilter": {
|
||||
"state": "OPEN",
|
||||
"assignee": "wildercayden"
|
||||
<component name="GitHubPullRequestSearchHistory">{
|
||||
"lastFilter": {
|
||||
"state": "OPEN",
|
||||
"assignee": "wildercayden"
|
||||
}
|
||||
}]]></component>
|
||||
}</component>
|
||||
<component name="GithubPullRequestsUISettings"><![CDATA[{
|
||||
"selectedUrlAndAccountId": {
|
||||
"url": "https://github.com/missluce54/Reefscape-Scouting-App.git",
|
||||
"accountId": "4df7fa0d-c486-4a64-b4eb-b84d7595dcb0"
|
||||
"accountId": "ed4354f5-1e2d-42fe-ae13-72a548075395"
|
||||
}
|
||||
}]]></component>
|
||||
<component name="ProjectColorInfo">{
|
||||
@@ -39,20 +37,20 @@
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"RunOnceActivity.cidr.known.project.marker": "true",
|
||||
"RunOnceActivity.git.unshallow": "true",
|
||||
"RunOnceActivity.readMode.enableVisualFormatting": "true",
|
||||
"android.gradle.sync.needed": "true",
|
||||
"cf.first.check.clang-format": "false",
|
||||
"cidr.known.project.marker": "true",
|
||||
"git-widget-placeholder": "main",
|
||||
"kotlin-language-version-configured": "true",
|
||||
"last_opened_file_path": "C:/Users/cayde/Desktop/ScoutingApp"
|
||||
<component name="PropertiesComponent">{
|
||||
"keyToString": {
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"RunOnceActivity.cidr.known.project.marker": "true",
|
||||
"RunOnceActivity.git.unshallow": "true",
|
||||
"RunOnceActivity.readMode.enableVisualFormatting": "true",
|
||||
"android.gradle.sync.needed": "true",
|
||||
"cf.first.check.clang-format": "false",
|
||||
"cidr.known.project.marker": "true",
|
||||
"git-widget-placeholder": "main",
|
||||
"kotlin-language-version-configured": "true",
|
||||
"last_opened_file_path": "C:/Users/cayde/Desktop/ScoutingApp"
|
||||
}
|
||||
}]]></component>
|
||||
}</component>
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="e6962293-3789-4c0b-8e8d-572b4ba78f5f" name="Changes" comment="" />
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package com.example.generator;
|
||||
|
||||
import android.media.metrics.Event;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -13,6 +15,8 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
public class Tab1 extends Fragment {
|
||||
|
||||
private static final String ARG_POSITION = "tab_position";
|
||||
@@ -28,6 +32,7 @@ public class Tab1 extends Fragment {
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
}
|
||||
public int[] NumButtonOb = new int[9];
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
@@ -36,13 +41,26 @@ public class Tab1 extends Fragment {
|
||||
@Nullable Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.fragment_tab1, container, false);
|
||||
|
||||
|
||||
int tabPosition = getArguments() != null ? getArguments().getInt(ARG_POSITION, 0) : 0;
|
||||
|
||||
TextView elementTitle = view.findViewById(R.id.text1);
|
||||
elementTitle.setText("Element " + (tabPosition + 1));
|
||||
elementTitle.setText("Object " + (tabPosition + 1));
|
||||
NumButtonOb = EventsActivity.Data.getNumButtonOb();
|
||||
|
||||
|
||||
EditText ToAdd = view.findViewById(R.id.toAdd);
|
||||
EditText ToAdd2 = view.findViewById(R.id.toAdd2);
|
||||
EditText ToAdd3 = view.findViewById(R.id.toAdd3);
|
||||
EditText ToAdd4 = view.findViewById(R.id.toAdd4);
|
||||
EditText ToAdd5 = view.findViewById(R.id.toAdd5);
|
||||
EditText ToAdd6 = view.findViewById(R.id.toAdd6);
|
||||
EditText ToAdd7 = view.findViewById(R.id.toAdd7);
|
||||
EditText ToAdd8 = view.findViewById(R.id.toAdd8);
|
||||
EditText ToAdd9 = view.findViewById(R.id.toAdd9);
|
||||
|
||||
EditText numOfButton = view.findViewById(R.id.numOfButton);
|
||||
View[] objectives = {
|
||||
View[] buttons = {
|
||||
view.findViewById(R.id.toAdd),
|
||||
view.findViewById(R.id.toAdd2),
|
||||
view.findViewById(R.id.toAdd3),
|
||||
@@ -53,10 +71,19 @@ public class Tab1 extends Fragment {
|
||||
view.findViewById(R.id.toAdd8),
|
||||
view.findViewById(R.id.toAdd9)
|
||||
};
|
||||
for (int o = 0; o < buttons.length; o++) {
|
||||
buttons[o].setVisibility(o < NumButtonOb[tabPosition] ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
if (NumButtonOb[tabPosition] == 0) {
|
||||
|
||||
}else {
|
||||
numOfButton.setText(String.valueOf(NumButtonOb[tabPosition]));
|
||||
}
|
||||
|
||||
numOfButton.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
@@ -64,16 +91,36 @@ public class Tab1 extends Fragment {
|
||||
EventsActivity.Data.setNumScoreOb(input);
|
||||
|
||||
int score = input.isEmpty() ? 0 : Integer.parseInt(input);
|
||||
NumButtonOb = EventsActivity.Data.getNumButtonOb();
|
||||
NumButtonOb[tabPosition] = score;
|
||||
EventsActivity.Data.setNumButtonOb(NumButtonOb);
|
||||
Log.d("score", Arrays.toString(NumButtonOb));
|
||||
|
||||
for (int o = 0; o < objectives.length; o++) {
|
||||
objectives[o].setVisibility(o < score ? View.VISIBLE : View.GONE);
|
||||
|
||||
for (int o = 0; o < buttons.length; o++) {
|
||||
buttons[o].setVisibility(o < NumButtonOb[tabPosition] ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {}
|
||||
public void afterTextChanged(Editable s) {
|
||||
}
|
||||
});
|
||||
|
||||
ToAdd.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {}
|
||||
});
|
||||
return view;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user