coommiting since I have to leave for a few days
This commit is contained in:
@@ -69,41 +69,41 @@ public class ColorActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
int mainColorRes = 0;
|
int mainColorRes = 0;
|
||||||
int bgTintRes = 0;
|
int bgTintRes = 0;
|
||||||
String hexColor = "";
|
String Color = "";
|
||||||
|
|
||||||
switch (selectedItem) {
|
switch (selectedItem) {
|
||||||
case "Primary Orange":
|
case "Primary Orange":
|
||||||
hexColor = "#FF5722";
|
Color = "Orange";
|
||||||
mainColorRes = R.color.orangeMain;
|
mainColorRes = R.color.orangeMain;
|
||||||
bgTintRes = R.color.orangeMain_bg;
|
bgTintRes = R.color.orangeMain_bg;
|
||||||
break;
|
break;
|
||||||
case "Primary Green":
|
case "Primary Green":
|
||||||
hexColor = "#0EE906";
|
Color = "Green";
|
||||||
mainColorRes = R.color.greenMain;
|
mainColorRes = R.color.greenMain;
|
||||||
bgTintRes = R.color.greenMain_bg;
|
bgTintRes = R.color.greenMain_bg;
|
||||||
break;
|
break;
|
||||||
case "Primary Blue":
|
case "Primary Blue":
|
||||||
hexColor = "#205CDF";
|
Color = "Blue";
|
||||||
mainColorRes = R.color.blueMain;
|
mainColorRes = R.color.blueMain;
|
||||||
bgTintRes = R.color.blueMain_bg;
|
bgTintRes = R.color.blueMain_bg;
|
||||||
break;
|
break;
|
||||||
case "Primary Pink":
|
case "Primary Pink":
|
||||||
hexColor = "#F200DD";
|
Color = "Pink";
|
||||||
mainColorRes = R.color.pinkMain;
|
mainColorRes = R.color.pinkMain;
|
||||||
bgTintRes = R.color.pinkMain_bg;
|
bgTintRes = R.color.pinkMain_bg;
|
||||||
break;
|
break;
|
||||||
case "Primary Purple":
|
case "Primary Purple":
|
||||||
hexColor = "#A30096";
|
Color = "Purple";
|
||||||
mainColorRes = R.color.purpleMain;
|
mainColorRes = R.color.purpleMain;
|
||||||
bgTintRes = R.color.purpleMain_bg;
|
bgTintRes = R.color.purpleMain_bg;
|
||||||
break;
|
break;
|
||||||
case "Primary Red":
|
case "Primary Red":
|
||||||
hexColor = "#DF2020";
|
Color = "Red";
|
||||||
mainColorRes = R.color.redMain;
|
mainColorRes = R.color.redMain;
|
||||||
bgTintRes = R.color.redMain_bg;
|
bgTintRes = R.color.redMain_bg;
|
||||||
break;
|
break;
|
||||||
case "Primary Yellow":
|
case "Primary Yellow":
|
||||||
hexColor = "#FFEB3B";
|
Color = "Yellow";
|
||||||
mainColorRes = R.color.yellowMain;
|
mainColorRes = R.color.yellowMain;
|
||||||
bgTintRes = R.color.yellowMain_bg;
|
bgTintRes = R.color.yellowMain_bg;
|
||||||
break;
|
break;
|
||||||
@@ -114,7 +114,7 @@ public class ColorActivity extends AppCompatActivity {
|
|||||||
ColorStateList bgTintStateList = ContextCompat.getColorStateList(ColorActivity.this, bgTintRes);
|
ColorStateList bgTintStateList = ContextCompat.getColorStateList(ColorActivity.this, bgTintRes);
|
||||||
int mainColorInt = ContextCompat.getColor(ColorActivity.this, mainColorRes);
|
int mainColorInt = ContextCompat.getColor(ColorActivity.this, mainColorRes);
|
||||||
|
|
||||||
MakeStartingActivity.Data.setColorP(hexColor);
|
MakeStartingActivity.Data.setColorP(Color);
|
||||||
|
|
||||||
spinnerP.setBackgroundColor(mainColorInt);
|
spinnerP.setBackgroundColor(mainColorInt);
|
||||||
radioButton.setButtonTintList(mainColorStateList);
|
radioButton.setButtonTintList(mainColorStateList);
|
||||||
@@ -127,6 +127,9 @@ public class ColorActivity extends AppCompatActivity {
|
|||||||
AutoExample2.setBackgroundTintList(bgTintStateList);
|
AutoExample2.setBackgroundTintList(bgTintStateList);
|
||||||
NavExample2.setBackgroundColor(mainColorInt);
|
NavExample2.setBackgroundColor(mainColorInt);
|
||||||
NavExample1.setBackgroundColor(mainColorInt);
|
NavExample1.setBackgroundColor(mainColorInt);
|
||||||
|
|
||||||
|
backButton.setBackgroundColor(mainColorInt);
|
||||||
|
nextButton.setBackgroundColor(mainColorInt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,41 +144,41 @@ public class ColorActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
int mainColorRes = 0;
|
int mainColorRes = 0;
|
||||||
int bgTintRes = 0;
|
int bgTintRes = 0;
|
||||||
String hexColor = "";
|
String Color = "";
|
||||||
|
|
||||||
switch (selectedItem) {
|
switch (selectedItem) {
|
||||||
case "Secondary Orange":
|
case "Secondary Orange":
|
||||||
hexColor = "#FF5722";
|
Color = "Orange";
|
||||||
mainColorRes = R.color.orangeMain;
|
mainColorRes = R.color.orangeMain;
|
||||||
bgTintRes = R.color.orangeMain_bg;
|
bgTintRes = R.color.orangeMain_bg;
|
||||||
break;
|
break;
|
||||||
case "Secondary Green":
|
case "Secondary Green":
|
||||||
hexColor = "#0EE906";
|
Color = "Green";
|
||||||
mainColorRes = R.color.greenMain;
|
mainColorRes = R.color.greenMain;
|
||||||
bgTintRes = R.color.greenMain_bg;
|
bgTintRes = R.color.greenMain_bg;
|
||||||
break;
|
break;
|
||||||
case "Secondary Blue":
|
case "Secondary Blue":
|
||||||
hexColor = "#205CDF";
|
Color = "Blue";
|
||||||
mainColorRes = R.color.blueMain;
|
mainColorRes = R.color.blueMain;
|
||||||
bgTintRes = R.color.blueMain_bg;
|
bgTintRes = R.color.blueMain_bg;
|
||||||
break;
|
break;
|
||||||
case "Secondary Pink":
|
case "Secondary Pink":
|
||||||
hexColor = "#F200DD";
|
Color = "Pink";
|
||||||
mainColorRes = R.color.pinkMain;
|
mainColorRes = R.color.pinkMain;
|
||||||
bgTintRes = R.color.pinkMain_bg;
|
bgTintRes = R.color.pinkMain_bg;
|
||||||
break;
|
break;
|
||||||
case "Secondary Purple":
|
case "Secondary Purple":
|
||||||
hexColor = "#A30096";
|
Color = "Purple";
|
||||||
mainColorRes = R.color.purpleMain;
|
mainColorRes = R.color.purpleMain;
|
||||||
bgTintRes = R.color.purpleMain_bg;
|
bgTintRes = R.color.purpleMain_bg;
|
||||||
break;
|
break;
|
||||||
case "Secondary Red":
|
case "Secondary Red":
|
||||||
hexColor = "#DF2020";
|
Color = "Red";
|
||||||
mainColorRes = R.color.redMain;
|
mainColorRes = R.color.redMain;
|
||||||
bgTintRes = R.color.redMain_bg;
|
bgTintRes = R.color.redMain_bg;
|
||||||
break;
|
break;
|
||||||
case "Secondary Yellow":
|
case "Secondary Yellow":
|
||||||
hexColor = "#FFEB3B";
|
Color = "Yellow";
|
||||||
mainColorRes = R.color.yellowMain;
|
mainColorRes = R.color.yellowMain;
|
||||||
bgTintRes = R.color.yellowMain_bg;
|
bgTintRes = R.color.yellowMain_bg;
|
||||||
break;
|
break;
|
||||||
@@ -186,7 +189,7 @@ public class ColorActivity extends AppCompatActivity {
|
|||||||
ColorStateList bgTintStateList = ContextCompat.getColorStateList(ColorActivity.this, bgTintRes);
|
ColorStateList bgTintStateList = ContextCompat.getColorStateList(ColorActivity.this, bgTintRes);
|
||||||
int mainColorInt = ContextCompat.getColor(ColorActivity.this, mainColorRes);
|
int mainColorInt = ContextCompat.getColor(ColorActivity.this, mainColorRes);
|
||||||
|
|
||||||
MakeStartingActivity.Data.setColorS(hexColor);
|
MakeStartingActivity.Data.setColorS(Color);
|
||||||
|
|
||||||
spinnerS.setBackgroundColor(mainColorInt);
|
spinnerS.setBackgroundColor(mainColorInt);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.example.generator;
|
package com.example.generator;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.content.res.ColorStateList;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.graphics.BitmapFactory;
|
import android.graphics.BitmapFactory;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
@@ -17,6 +18,7 @@ import androidx.activity.result.ActivityResultLauncher;
|
|||||||
import androidx.activity.result.PickVisualMediaRequest;
|
import androidx.activity.result.PickVisualMediaRequest;
|
||||||
import androidx.activity.result.contract.ActivityResultContracts;
|
import androidx.activity.result.contract.ActivityResultContracts;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.core.graphics.Insets;
|
import androidx.core.graphics.Insets;
|
||||||
import androidx.core.view.ViewCompat;
|
import androidx.core.view.ViewCompat;
|
||||||
import androidx.core.view.WindowInsetsCompat;
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
@@ -29,6 +31,13 @@ public class MakeStartingActivity extends AppCompatActivity {
|
|||||||
public static Data Data = new Data();
|
public static Data Data = new Data();
|
||||||
private ImageView imageView;
|
private ImageView imageView;
|
||||||
private int numPos = -1;
|
private int numPos = -1;
|
||||||
|
|
||||||
|
private int mainColorResP = 0;
|
||||||
|
private int bgTintResP = 0;
|
||||||
|
private String ColorP = "";
|
||||||
|
private int mainColorResS = 0;
|
||||||
|
private int bgTintResS = 0;
|
||||||
|
private String ColorS = "";
|
||||||
private EditText numPosEdit;
|
private EditText numPosEdit;
|
||||||
private String Base64img = "";
|
private String Base64img = "";
|
||||||
private final ActivityResultLauncher<PickVisualMediaRequest> pickMedia =
|
private final ActivityResultLauncher<PickVisualMediaRequest> pickMedia =
|
||||||
@@ -56,6 +65,81 @@ public class MakeStartingActivity extends AppCompatActivity {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
switch (Data.getColorS()) {
|
||||||
|
case "Orange":
|
||||||
|
ColorS = "Orange";
|
||||||
|
mainColorResS = R.color.orangeMain;
|
||||||
|
bgTintResS = R.color.orangeMain_bg;
|
||||||
|
break;
|
||||||
|
case "Green":
|
||||||
|
ColorS = "Green";
|
||||||
|
mainColorResS = R.color.greenMain;
|
||||||
|
bgTintResS = R.color.greenMain_bg;
|
||||||
|
break;
|
||||||
|
case "Blue":
|
||||||
|
ColorS = "Blue";
|
||||||
|
mainColorResS = R.color.blueMain;
|
||||||
|
bgTintResS = R.color.blueMain_bg;
|
||||||
|
break;
|
||||||
|
case "Pink":
|
||||||
|
ColorS = "Pink";
|
||||||
|
mainColorResS = R.color.pinkMain;
|
||||||
|
bgTintResS = R.color.pinkMain_bg;
|
||||||
|
break;
|
||||||
|
case "Purple":
|
||||||
|
ColorS = "Purple";
|
||||||
|
mainColorResS = R.color.purpleMain;
|
||||||
|
bgTintResS = R.color.purpleMain_bg;
|
||||||
|
break;
|
||||||
|
case "Red":
|
||||||
|
ColorS = "Red";
|
||||||
|
mainColorResS = R.color.redMain;
|
||||||
|
bgTintResS = R.color.redMain_bg;
|
||||||
|
break;
|
||||||
|
case "Yellow":
|
||||||
|
ColorS = "Yellow";
|
||||||
|
mainColorResS = R.color.yellowMain;
|
||||||
|
bgTintResS = R.color.yellowMain_bg;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (Data.getColorP()) {
|
||||||
|
case "Orange":
|
||||||
|
ColorP = "Orange";
|
||||||
|
mainColorResP = R.color.orangeMain;
|
||||||
|
bgTintResP = R.color.orangeMain_bg;
|
||||||
|
break;
|
||||||
|
case "Green":
|
||||||
|
ColorP = "Green";
|
||||||
|
mainColorResP = R.color.greenMain;
|
||||||
|
bgTintResP = R.color.greenMain_bg;
|
||||||
|
break;
|
||||||
|
case "Blue":
|
||||||
|
ColorP = "Blue";
|
||||||
|
mainColorResP = R.color.blueMain;
|
||||||
|
bgTintResP = R.color.blueMain_bg;
|
||||||
|
break;
|
||||||
|
case "Pink":
|
||||||
|
ColorP = "Pink";
|
||||||
|
mainColorResP = R.color.pinkMain;
|
||||||
|
bgTintResP = R.color.pinkMain_bg;
|
||||||
|
break;
|
||||||
|
case "Purple":
|
||||||
|
ColorP = "Purple";
|
||||||
|
mainColorResP = R.color.purpleMain;
|
||||||
|
bgTintResP = R.color.purpleMain_bg;
|
||||||
|
break;
|
||||||
|
case "Red":
|
||||||
|
ColorP = "Red";
|
||||||
|
mainColorResP = R.color.redMain;
|
||||||
|
bgTintResP = R.color.redMain_bg;
|
||||||
|
break;
|
||||||
|
case "Yellow":
|
||||||
|
ColorP = "Yellow";
|
||||||
|
mainColorResP = R.color.yellowMain;
|
||||||
|
bgTintResP = R.color.yellowMain_bg;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
imageView = findViewById(R.id.imageView);
|
imageView = findViewById(R.id.imageView);
|
||||||
Button nextButton = (Button) findViewById(R.id.button_next);
|
Button nextButton = (Button) findViewById(R.id.button_next);
|
||||||
@@ -63,6 +147,21 @@ public class MakeStartingActivity extends AppCompatActivity {
|
|||||||
Button chooseButton = (Button) findViewById(R.id.button_image);
|
Button chooseButton = (Button) findViewById(R.id.button_image);
|
||||||
numPosEdit = findViewById(R.id.numPos);
|
numPosEdit = findViewById(R.id.numPos);
|
||||||
|
|
||||||
|
if (mainColorResP != 0) {
|
||||||
|
// 1. Convert the Resource ID (R.color...) into the actual ARGB color integer
|
||||||
|
int actualColor = ContextCompat.getColor(this, mainColorResP);
|
||||||
|
|
||||||
|
// 2. Turn that color into a ColorStateList
|
||||||
|
ColorStateList tintList = ColorStateList.valueOf(actualColor);
|
||||||
|
|
||||||
|
// 3. Apply ONLY the tint so you keep your rounded button styling
|
||||||
|
ViewCompat.setBackgroundTintList(nextButton, tintList);
|
||||||
|
ViewCompat.setBackgroundTintList(backButton, tintList);
|
||||||
|
ViewCompat.setBackgroundTintList(chooseButton, tintList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
backButton.setOnClickListener((v) -> {
|
backButton.setOnClickListener((v) -> {
|
||||||
Intent intent = new Intent(this, MainActivity.class);
|
Intent intent = new Intent(this, MainActivity.class);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import android.util.Base64;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
|
import android.widget.EditText;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.RadioButton;
|
import android.widget.RadioButton;
|
||||||
import android.widget.RadioGroup;
|
import android.widget.RadioGroup;
|
||||||
@@ -22,6 +23,14 @@ import androidx.core.view.WindowInsetsCompat;
|
|||||||
|
|
||||||
public class StartingPreview extends AppCompatActivity {
|
public class StartingPreview extends AppCompatActivity {
|
||||||
|
|
||||||
|
private int mainColorResP = 0;
|
||||||
|
private int bgTintResP = 0;
|
||||||
|
private String ColorP = "";
|
||||||
|
private int mainColorResS = 0;
|
||||||
|
private int bgTintResS = 0;
|
||||||
|
private String ColorS = "";
|
||||||
|
private EditText numPosEdit;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
@@ -33,6 +42,84 @@ public class StartingPreview extends AppCompatActivity {
|
|||||||
return insets;
|
return insets;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
switch (MakeStartingActivity.Data.getColorS()) {
|
||||||
|
case "Orange":
|
||||||
|
ColorS = "Orange";
|
||||||
|
mainColorResS = R.color.orangeMain;
|
||||||
|
bgTintResS = R.color.orangeMain_bg;
|
||||||
|
break;
|
||||||
|
case "Green":
|
||||||
|
ColorS = "Green";
|
||||||
|
mainColorResS = R.color.greenMain;
|
||||||
|
bgTintResS = R.color.greenMain_bg;
|
||||||
|
break;
|
||||||
|
case "Blue":
|
||||||
|
ColorS = "Blue";
|
||||||
|
mainColorResS = R.color.blueMain;
|
||||||
|
bgTintResS = R.color.blueMain_bg;
|
||||||
|
break;
|
||||||
|
case "Pink":
|
||||||
|
ColorS = "Pink";
|
||||||
|
mainColorResS = R.color.pinkMain;
|
||||||
|
bgTintResS = R.color.pinkMain_bg;
|
||||||
|
break;
|
||||||
|
case "Purple":
|
||||||
|
ColorS = "Purple";
|
||||||
|
mainColorResS = R.color.purpleMain;
|
||||||
|
bgTintResS = R.color.purpleMain_bg;
|
||||||
|
break;
|
||||||
|
case "Red":
|
||||||
|
ColorS = "Red";
|
||||||
|
mainColorResS = R.color.redMain;
|
||||||
|
bgTintResS = R.color.redMain_bg;
|
||||||
|
break;
|
||||||
|
case "Yellow":
|
||||||
|
ColorS = "Yellow";
|
||||||
|
mainColorResS = R.color.yellowMain;
|
||||||
|
bgTintResS = R.color.yellowMain_bg;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (MakeStartingActivity.Data.getColorP ()) {
|
||||||
|
case "Orange":
|
||||||
|
ColorP = "Orange";
|
||||||
|
mainColorResP = R.color.orangeMain;
|
||||||
|
bgTintResP = R.color.orangeMain_bg;
|
||||||
|
break;
|
||||||
|
case "Green":
|
||||||
|
ColorP = "Green";
|
||||||
|
mainColorResP = R.color.greenMain;
|
||||||
|
bgTintResP = R.color.greenMain_bg;
|
||||||
|
break;
|
||||||
|
case "Blue":
|
||||||
|
ColorP = "Blue";
|
||||||
|
mainColorResP = R.color.blueMain;
|
||||||
|
bgTintResP = R.color.blueMain_bg;
|
||||||
|
break;
|
||||||
|
case "Pink":
|
||||||
|
ColorP = "Pink";
|
||||||
|
mainColorResP = R.color.pinkMain;
|
||||||
|
bgTintResP = R.color.pinkMain_bg;
|
||||||
|
break;
|
||||||
|
case "Purple":
|
||||||
|
ColorP = "Purple";
|
||||||
|
mainColorResP = R.color.purpleMain;
|
||||||
|
bgTintResP = R.color.purpleMain_bg;
|
||||||
|
break;
|
||||||
|
case "Red":
|
||||||
|
ColorP = "Red";
|
||||||
|
mainColorResP = R.color.redMain;
|
||||||
|
bgTintResP = R.color.redMain_bg;
|
||||||
|
break;
|
||||||
|
case "Yellow":
|
||||||
|
ColorP = "Yellow";
|
||||||
|
mainColorResP = R.color.yellowMain;
|
||||||
|
bgTintResP = R.color.yellowMain_bg;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
ImageView imageView2 = findViewById(R.id.imageView2);
|
ImageView imageView2 = findViewById(R.id.imageView2);
|
||||||
String imageBase64 = MakeStartingActivity.Data.getBase64();
|
String imageBase64 = MakeStartingActivity.Data.getBase64();
|
||||||
|
|
||||||
|
|||||||
10
ScoutingApp/.idea/deploymentTargetSelector.xml
generated
Normal file
10
ScoutingApp/.idea/deploymentTargetSelector.xml
generated
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="deploymentTargetSelector">
|
||||||
|
<selectionStates>
|
||||||
|
<SelectionState runConfigName="Scouting">
|
||||||
|
<option name="selectionMode" value="DROPDOWN" />
|
||||||
|
</SelectionState>
|
||||||
|
</selectionStates>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
Reference in New Issue
Block a user