added five fully functional themes =D

This commit is contained in:
JG-Cody 2021-06-10 21:36:52 +02:00
parent e4f7fb59c5
commit 86c71a5abb
16 changed files with 718 additions and 132 deletions

View File

@ -13,13 +13,13 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Teraplex">
android:theme="@style/Theme.red_blue">
<activity
android:screenOrientation="sensorPortrait"
android:resizeableActivity="false"
android:name=".IntroActivity"
android:label="@string/app_name"
android:theme="@style/Theme.Teraplex.NoActionBar">
android:theme="@style/Theme.red_blue.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@ -32,7 +32,7 @@
android:resizeableActivity="false"
android:name=".MainActivity"
android:label="@string/app_name"
android:theme="@style/Theme.Teraplex.NoActionBar">
android:theme="@style/Theme.red_blue.NoActionBar">
</activity>
</application>

View File

@ -86,6 +86,23 @@ public class MainActivity extends AppCompatActivity implements AddButtonDialog.A
config.locale = locale;
getBaseContext().getResources().updateConfiguration(config, getBaseContext().getResources().getDisplayMetrics());
String Theme = p.getString("Theme", "RED_BLUE");
if (Theme.equals("RED_BLUE")) {
setTheme(R.style.Theme_red_blue);
}
if (Theme.equals("GREEN_YELLOW")) {
setTheme(R.style.Theme_green_yellow);
}
if (Theme.equals("ORANGE_TURQUOISE")) {
setTheme(R.style.Theme_orange_turquoise);
}
if (Theme.equals("YELLOW_BLUE")) {
setTheme(R.style.Theme_yellow_blue);
}
if (Theme.equals("PINK_GREEN")) {
setTheme(R.style.Theme_pink_green);
}
setContentView(R.layout.activity_main);
Toolbar toolbar = findViewById(R.id.toolbar);
@ -257,11 +274,11 @@ public class MainActivity extends AppCompatActivity implements AddButtonDialog.A
cursor.close();
// String picturePath contains the path of selected Image
try {
InputStream Background= getContentResolver().openInputStream(selectedImage);
InputStream Background = getContentResolver().openInputStream(selectedImage);
ByteArrayOutputStream bOut = new ByteArrayOutputStream();
int len;
byte[] buf = new byte[1024];
while((len = Background.read(buf)) > 0) {
while ((len = Background.read(buf)) > 0) {
bOut.write(buf, 0, len);
}
Background.close();
@ -277,6 +294,7 @@ public class MainActivity extends AppCompatActivity implements AddButtonDialog.A
}
}
@RequiresApi(api = Build.VERSION_CODES.O)
private void loadBackground() {
SharedPreferences p = getSharedPreferences("appsettings", Activity.MODE_PRIVATE);
@ -286,6 +304,7 @@ public class MainActivity extends AppCompatActivity implements AddButtonDialog.A
I.setImageBitmap(BitmapFactory.decodeByteArray(BA, 0, BA.length));
}
public static int getScreenWidth() {
return Resources.getSystem().getDisplayMetrics().widthPixels;
}
@ -293,8 +312,9 @@ public class MainActivity extends AppCompatActivity implements AddButtonDialog.A
public static int getScreenHeight() {
return Resources.getSystem().getDisplayMetrics().heightPixels;
}
public static Bitmap scaleCenterCrop(Bitmap source, int newHeight,
int newWidth) {
int newWidth) {
int sourceWidth = source.getWidth();
int sourceHeight = source.getHeight();
@ -319,6 +339,7 @@ public class MainActivity extends AppCompatActivity implements AddButtonDialog.A
return dest;
}
public static Bitmap createImage(int width, int height, int color) {
Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(bitmap);

View File

@ -37,7 +37,6 @@ import static android.content.Context.MODE_PRIVATE;
public class EinstellungenFragment extends Fragment {
private EinstellungenViewModel einstellungenViewModel;
Button button_colorpicker;
@RequiresApi(api = Build.VERSION_CODES.O)
public View onCreateView(@NonNull LayoutInflater inflater,
@ -53,27 +52,6 @@ public class EinstellungenFragment extends Fragment {
I.setImageDrawable(new BitmapDrawable(getResources(), MainActivity.scaleCenterCrop(BitmapFactory.decodeByteArray(BA, 0, BA.length), MainActivity.getScreenHeight(), MainActivity.getScreenWidth())));
I.setScaleType(ImageView.ScaleType.CENTER_CROP);
}
button_colorpicker = (Button) root.findViewById(R.id.button_colorpicker);
button_colorpicker.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
try {
Toast.makeText(getContext(), "Colorpicker", Toast.LENGTH_SHORT).show();
final ColorPickerView picker = new ColorPickerView(getContext());
picker.setColor(0xff12345);
AlertDialog mDialog = new AlertDialog.Builder(getContext()).setView(picker).setTitle(R.string.colorpicker).setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
}).create();
mDialog.getWindow().setBackgroundDrawableResource(R.drawable.button_round);
mDialog.show();
} catch (Exception e) {
}
}
});
Button Language = root.findViewById(R.id.button_language);
Language.setOnClickListener(new View.OnClickListener() {
@Override
@ -124,8 +102,77 @@ public class EinstellungenFragment extends Fragment {
}
});
Button theme1 = root.findViewById(R.id.button_theme_red_blue);
theme1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Toast.makeText(getContext(), "Theme1", Toast.LENGTH_SHORT).show();
SharedPreferences.Editor editor = getContext().getSharedPreferences("appsettings", MODE_PRIVATE).edit();
editor.putString("Theme", "RED_BLUE");
editor.apply();
startActivity(getActivity().getIntent());
getActivity().finish();
}
});
Button theme2 = root.findViewById(R.id.button_theme_green_yellow);
theme2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Toast.makeText(getContext(), "Theme2", Toast.LENGTH_SHORT).show();
SharedPreferences.Editor editor = getContext().getSharedPreferences("appsettings", MODE_PRIVATE).edit();
editor.putString("Theme", "GREEN_YELLOW");
editor.apply();
startActivity(getActivity().getIntent());
getActivity().finish();
}
});
Button theme3 = root.findViewById(R.id.button_theme_orange_turquoise);
theme3.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Toast.makeText(getContext(), "Theme3", Toast.LENGTH_SHORT).show();
SharedPreferences.Editor editor = getContext().getSharedPreferences("appsettings", MODE_PRIVATE).edit();
editor.putString("Theme", "ORANGE_TURQUOISE");
editor.apply();
startActivity(getActivity().getIntent());
getActivity().finish();
}
});
Button theme4 = root.findViewById(R.id.button_theme_yellow_blue);
theme4.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Toast.makeText(getContext(), "Theme4", Toast.LENGTH_SHORT).show();
SharedPreferences.Editor editor = getContext().getSharedPreferences("appsettings", MODE_PRIVATE).edit();
editor.putString("Theme", "YELLOW_BLUE");
editor.apply();
startActivity(getActivity().getIntent());
getActivity().finish();
}
});
Button theme5 = root.findViewById(R.id.button_theme_pink_green);
theme5.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Toast.makeText(getContext(), "Theme5", Toast.LENGTH_SHORT).show();
SharedPreferences.Editor editor = getContext().getSharedPreferences("appsettings", MODE_PRIVATE).edit();
editor.putString("Theme", "PINK_GREEN");
editor.apply();
startActivity(getActivity().getIntent());
getActivity().finish();
}
});
return root;
}
@ -158,7 +205,7 @@ public class EinstellungenFragment extends Fragment {
}
private void showChangeBackgroundDialog() {
final String[] listItems = {"FARBE","GRADIENT", "GRAFIK", "RESET BACKGROUND"};
final String[] listItems = {"FARBE", "GRADIENT", "GRAFIK", "RESET BACKGROUND"};
AlertDialog.Builder mBuilder = new AlertDialog.Builder(getContext());
mBuilder.setTitle("CHOOSE BACKGROUND-TYPE");
mBuilder.setSingleChoiceItems(listItems, -5, new DialogInterface.OnClickListener() {
@ -189,7 +236,6 @@ public class EinstellungenFragment extends Fragment {
public void onClick(DialogInterface dialog, int which) {
}
}).create();
mDialog.getWindow().setBackgroundDrawableResource(R.drawable.button_round);
@ -224,4 +270,7 @@ public class EinstellungenFragment extends Fragment {
editor.putString("Language", lang);
editor.apply();
}
}

View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="0dp"
android:color="#FFFFFF" />
<gradient
android:angle="180"
android:endColor="#00FF0A"
android:startColor="#FFDC00" />
<corners
android:bottomLeftRadius="20dp"
android:bottomRightRadius="20dp"
android:topLeftRadius="20dp"
android:topRightRadius="20dp" />
</shape>
</item>
<item
android:bottom="2dp"
android:left="2dp"
android:right="2dp"
android:top="2dp">
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="0dp"
android:color="#FFFFFF" />
<gradient
android:angle="180"
android:endColor="?attr/colorOnBackground"
android:startColor="?attr/colorOnBackground" />
<corners
android:bottomLeftRadius="20dp"
android:bottomRightRadius="20dp"
android:topLeftRadius="20dp"
android:topRightRadius="20dp" />
</shape>
</item>
</layer-list>

View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="0dp"
android:color="#FFFFFF" />
<gradient
android:angle="180"
android:endColor="#FF7700"
android:startColor="#00FFF7" />
<corners
android:bottomLeftRadius="20dp"
android:bottomRightRadius="20dp"
android:topLeftRadius="20dp"
android:topRightRadius="20dp" />
</shape>
</item>
<item
android:bottom="2dp"
android:left="2dp"
android:right="2dp"
android:top="2dp">
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="0dp"
android:color="#FFFFFF" />
<gradient
android:angle="180"
android:endColor="?attr/colorOnBackground"
android:startColor="?attr/colorOnBackground" />
<corners
android:bottomLeftRadius="20dp"
android:bottomRightRadius="20dp"
android:topLeftRadius="20dp"
android:topRightRadius="20dp" />
</shape>
</item>
</layer-list>

View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="0dp"
android:color="#FFFFFF" />
<gradient
android:angle="180"
android:endColor="#D900FF"
android:startColor="#89FF00" />
<corners
android:bottomLeftRadius="20dp"
android:bottomRightRadius="20dp"
android:topLeftRadius="20dp"
android:topRightRadius="20dp" />
</shape>
</item>
<item
android:bottom="2dp"
android:left="2dp"
android:right="2dp"
android:top="2dp">
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="0dp"
android:color="#FFFFFF" />
<gradient
android:angle="180"
android:endColor="?attr/colorOnBackground"
android:startColor="?attr/colorOnBackground" />
<corners
android:bottomLeftRadius="20dp"
android:bottomRightRadius="20dp"
android:topLeftRadius="20dp"
android:topRightRadius="20dp" />
</shape>
</item>
</layer-list>

View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="0dp"
android:color="#FFFFFF" />
<gradient
android:angle="180"
android:endColor="@color/red"
android:startColor="@color/blue" />
<corners
android:bottomLeftRadius="20dp"
android:bottomRightRadius="20dp"
android:topLeftRadius="20dp"
android:topRightRadius="20dp" />
</shape>
</item>
<item
android:bottom="2dp"
android:left="2dp"
android:right="2dp"
android:top="2dp">
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="0dp"
android:color="#FFFFFF" />
<gradient
android:angle="180"
android:endColor="?attr/colorOnBackground"
android:startColor="?attr/colorOnBackground" />
<corners
android:bottomLeftRadius="20dp"
android:bottomRightRadius="20dp"
android:topLeftRadius="20dp"
android:topRightRadius="20dp" />
</shape>
</item>
</layer-list>

View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="0dp"
android:color="#FFFFFF" />
<gradient
android:angle="180"
android:endColor="#FFE500"
android:startColor="@color/blue" />
<corners
android:bottomLeftRadius="20dp"
android:bottomRightRadius="20dp"
android:topLeftRadius="20dp"
android:topRightRadius="20dp" />
</shape>
</item>
<item
android:bottom="2dp"
android:left="2dp"
android:right="2dp"
android:top="2dp">
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="0dp"
android:color="#FFFFFF" />
<gradient
android:angle="180"
android:endColor="?attr/colorOnBackground"
android:startColor="?attr/colorOnBackground" />
<corners
android:bottomLeftRadius="20dp"
android:bottomRightRadius="20dp"
android:topLeftRadius="20dp"
android:topRightRadius="20dp" />
</shape>
</item>
</layer-list>

View File

@ -7,8 +7,8 @@
android:color="#FFFFFF" />
<gradient
android:angle="180"
android:endColor="@color/purple_200"
android:startColor="#0088FF" />
android:endColor="?attr/colorPrimary"
android:startColor="?attr/colorSecondary" />
<corners
android:bottomLeftRadius="0dp"
android:bottomRightRadius="00dp"

View File

@ -10,7 +10,7 @@
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/Theme.Teraplex.AppBarOverlay">
android:theme="@style/Theme.red_blue.AppBarOverlay">
</com.google.android.material.appbar.AppBarLayout>
@ -46,6 +46,6 @@
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:layout_anchorGravity="center"
app:popupTheme="@style/Theme.Teraplex.PopupOverlay" />
app:popupTheme="@style/Theme.red_blue.PopupOverlay" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -10,7 +10,7 @@
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/Theme.Teraplex.AppBarOverlay">
android:theme="@style/Theme.red_blue.AppBarOverlay">
</com.google.android.material.appbar.AppBarLayout>
@ -31,6 +31,6 @@
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:layout_anchorGravity="center"
app:popupTheme="@style/Theme.Teraplex.PopupOverlay" />
app:popupTheme="@style/Theme.red_blue.PopupOverlay" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -4,10 +4,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:clickable="true"
android:layout_height="match_parent"
tools:context=".ui.Einstellungen.EinstellungenFragment">
android:layout_height="match_parent">
<ImageView
android:id="@+id/Background"
android:layout_width="0dp"
@ -16,11 +13,22 @@
android:src="@drawable/background"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true"
tools:context=".ui.Credits.CreditsFragment">
<ImageView
android:id="@drawable/backgroundoverlay"
android:layout_width="0dp"
@ -34,85 +42,83 @@
android:scaleType="centerCrop"
android:src="@drawable/backgroundoverlay"
app:layout_constraintBottom_toBottomOf="@+id/button_reset"
app:layout_constraintEnd_toEndOf="@+id/button_colorpicker"
app:layout_constraintStart_toStartOf="@+id/colors"
app:layout_constraintTop_toTopOf="@+id/button_colorpicker"
app:layout_constraintEnd_toEndOf="@+id/button_theme_red_blue"
app:layout_constraintStart_toStartOf="@+id/themes"
app:layout_constraintTop_toTopOf="@+id/button_theme_red_blue"
app:layout_constraintVertical_bias="0.0" />
<TextView
android:id="@+id/background"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="50dp"
android:layout_marginLeft="50dp"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:gravity="center_horizontal|left"
android:text="@string/hintergrund"
android:textAlignment="center"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="18sp"
app:layout_constraintBottom_toTopOf="@+id/divider"
app:layout_constraintEnd_toStartOf="@+id/button_pickimage"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/divider2" />
<TextView
android:id="@+id/background"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="50dp"
android:layout_marginLeft="50dp"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:gravity="center_horizontal|left"
android:text="@string/hintergrund"
android:textAlignment="center"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="18sp"
app:layout_constraintBottom_toTopOf="@+id/divider"
app:layout_constraintEnd_toStartOf="@+id/button_pickimage"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/button_pickimage" />
<TextView
android:id="@+id/colors"
android:id="@+id/themes"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="50dp"
android:layout_marginLeft="50dp"
android:layout_marginTop="125dp"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="25dp"
android:gravity="center_horizontal|left"
android:text="@string/farben"
android:text="@string/themes"
android:textAlignment="center"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="18sp"
app:layout_constraintBottom_toTopOf="@+id/divider2"
app:layout_constraintEnd_toStartOf="@+id/button_colorpicker"
app:layout_constraintBottom_toBottomOf="@+id/button_theme_pink_green"
app:layout_constraintEnd_toStartOf="@+id/button_theme_red_blue"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="@+id/button_theme_red_blue" />
<TextView
android:id="@+id/sprache"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="50dp"
android:layout_marginLeft="50dp"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:gravity="center_horizontal|left"
android:text="@string/sprache"
android:textAlignment="center"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="18sp"
app:layout_constraintBottom_toTopOf="@+id/divider3"
app:layout_constraintEnd_toStartOf="@+id/button_language"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/divider" />
<TextView
android:id="@+id/sprache"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="50dp"
android:layout_marginLeft="50dp"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:gravity="center_horizontal|left"
android:text="@string/sprache"
android:textAlignment="center"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="@+id/button_language"
app:layout_constraintEnd_toStartOf="@+id/button_language"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/button_language" />
<TextView
android:id="@+id/reset_settings"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="50dp"
android:layout_marginLeft="50dp"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:gravity="center_horizontal|left"
android:text="@string/einstellungen_zurücksetzen"
android:textAlignment="center"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="@+id/button_reset"
app:layout_constraintEnd_toStartOf="@+id/button_reset"
app:layout_constraintStart_toStartOf="@+id/Background"
app:layout_constraintTop_toTopOf="@+id/button_reset" />
<TextView
android:id="@+id/reset_settings"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="50dp"
android:layout_marginLeft="50dp"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:gravity="center_horizontal|left"
android:text="@string/einstellungen_zurücksetzen"
android:textAlignment="center"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="@+id/button_reset"
app:layout_constraintEnd_toStartOf="@+id/button_reset"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/button_reset" />
<Button
android:id="@+id/button_reset"
@ -127,21 +133,76 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/divider3" />
<Button
android:id="@+id/button_colorpicker"
android:layout_width="140dp"
android:layout_height="55dp"
android:layout_marginTop="85dp"
android:layout_marginEnd="50dp"
android:layout_marginRight="50dp"
android:background="@drawable/button_round"
android:text="COLORPICKER"
app:backgroundTint="@null"
app:layout_constraintBottom_toTopOf="@+id/divider2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/Background" />
<Button
android:id="@+id/button_theme_red_blue"
android:layout_width="140dp"
android:layout_height="55dp"
android:layout_marginTop="125dp"
android:layout_marginEnd="50dp"
android:layout_marginRight="50dp"
android:background="@drawable/button_theme_red_blue"
android:text="RED\nBLUE"
app:backgroundTint="@null"
app:layout_constraintBottom_toTopOf="@+id/button_theme_green_yellow"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
<Button
android:id="@+id/button_theme_orange_turquoise"
android:layout_width="140dp"
android:layout_height="55dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="50dp"
android:layout_marginRight="50dp"
android:background="@drawable/button_theme_orange_turquoise"
android:text="ORANGE\nTURQUOISE"
app:backgroundTint="@null"
app:layout_constraintBottom_toTopOf="@+id/button_theme_yellow_blue"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button_theme_green_yellow" />
<Button
android:id="@+id/button_theme_yellow_blue"
android:layout_width="140dp"
android:layout_height="55dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="50dp"
android:layout_marginRight="50dp"
android:background="@drawable/button_theme_yellow_blue"
android:text="YELLOW\nBLUE"
app:backgroundTint="@null"
app:layout_constraintBottom_toTopOf="@+id/button_theme_pink_green"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button_theme_orange_turquoise" />
<Button
android:id="@+id/button_theme_pink_green"
android:layout_width="140dp"
android:layout_height="55dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="50dp"
android:layout_marginRight="50dp"
android:background="@drawable/button_theme_pink_green"
android:text="PINK\nGREEN"
app:backgroundTint="@null"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button_theme_yellow_blue" />
<Button
android:id="@+id/button_theme_green_yellow"
android:layout_width="140dp"
android:layout_height="55dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="50dp"
android:layout_marginRight="50dp"
android:background="@drawable/button_theme_green_yellow"
android:text="GREEN\nYELLOW"
app:backgroundTint="@null"
app:layout_constraintBottom_toTopOf="@+id/button_theme_orange_turquoise"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button_theme_red_blue" />
<Button
android:id="@+id/button_language"
android:layout_width="140dp"
android:layout_height="55dp"
@ -183,12 +244,12 @@
android:id="@+id/divider2"
android:layout_width="0dp"
android:layout_height="2dp"
android:layout_marginTop="12dp"
android:layout_marginTop="10dp"
android:background="@drawable/background_full"
app:layout_constraintEnd_toEndOf="@+id/button_colorpicker"
app:layout_constraintEnd_toEndOf="@+id/button_theme_red_blue"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="@+id/colors"
app:layout_constraintTop_toBottomOf="@+id/button_colorpicker" />
app:layout_constraintStart_toStartOf="@+id/themes"
app:layout_constraintTop_toBottomOf="@+id/button_theme_pink_green" />
<View
android:id="@+id/divider3"
@ -200,4 +261,15 @@
app:layout_constraintStart_toStartOf="@+id/divider"
app:layout_constraintTop_toBottomOf="@+id/button_language" />
<Space
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="75dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button_reset" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -1,6 +1,6 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.Teraplex" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<style name="Theme.red_blue" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="android:windowTranslucentStatus" tools:targetApi="kitkat">true</item>
<item name="android:windowTranslucentNavigation" tools:targetApi="kitkat">true</item>
@ -13,12 +13,140 @@
<item name="colorBackgroundFloating">#BF000000</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/blue</item>
<item name="colorSecondaryVariant">@color/blue</item>
<item name="colorOnSecondary">@color/white</item>
<item name="colorSecondaryVariant">@color/red_dark</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<!-- <item name="android:statusBarColor" tools:targetApi="l">#00FFFFFF</item> -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
<item name="android:actionMenuTextColor">@color/white</item>
</style>
<style name="Theme.red_blue.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="Theme.red_blue.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="Theme.red_blue.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<style name="Theme.green_yellow.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="Theme.green_yellow.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="Theme.green_yellow.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<style name="PopupMenuStyle" parent="Theme.AppCompat.Light">
<item name="android:background">@color/white</item>
</style>
<style name="Theme.orange_turquoise.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="Theme.orange_turquoise.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="Theme.orange_turquoise.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<style name="Theme.yellow_blue.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="Theme.yellow_blue.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="Theme.yellow_blue.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<style name="Theme.pink_green.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="Theme.pink_green.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="Theme.pink_green.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<style name="Theme.green_yellow" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="android:windowTranslucentStatus" tools:targetApi="kitkat">true</item>
<item name="android:windowTranslucentNavigation" tools:targetApi="kitkat">true</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="colorPrimary">@color/green</item>
<item name="colorPrimaryVariant">@color/white</item>
<item name="colorOnPrimary">@color/white</item>
<item name="colorOnBackground">@color/colorOnBackgroundNight</item>
<item name="colorBackgroundFloating">#BF000000</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/yellow</item>
<item name="colorSecondaryVariant">@color/red_dark</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
<style name="Theme.orange_turquoise" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="android:windowTranslucentStatus" tools:targetApi="kitkat">true</item>
<item name="android:windowTranslucentNavigation" tools:targetApi="kitkat">true</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="colorPrimary">@color/orange</item>
<item name="colorPrimaryVariant">@color/white</item>
<item name="colorOnPrimary">@color/white</item>
<item name="colorOnBackground">@color/colorOnBackgroundNight</item>
<item name="colorBackgroundFloating">#BF000000</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/turquoise</item>
<item name="colorSecondaryVariant">@color/red_dark</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
<style name="Theme.yellow_blue" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="android:windowTranslucentStatus" tools:targetApi="kitkat">true</item>
<item name="android:windowTranslucentNavigation" tools:targetApi="kitkat">true</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="colorPrimary">@color/yellow</item>
<item name="colorPrimaryVariant">@color/white</item>
<item name="colorOnPrimary">@color/white</item>
<item name="colorOnBackground">@color/colorOnBackgroundNight</item>
<item name="colorBackgroundFloating">#BF000000</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/blue</item>
<item name="colorSecondaryVariant">@color/red_dark</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
<style name="Theme.pink_green" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="android:windowTranslucentStatus" tools:targetApi="kitkat">true</item>
<item name="android:windowTranslucentNavigation" tools:targetApi="kitkat">true</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="colorPrimary">@color/pink</item>
<item name="colorPrimaryVariant">@color/white</item>
<item name="colorOnPrimary">@color/white</item>
<item name="colorOnBackground">@color/colorOnBackgroundNight</item>
<item name="colorBackgroundFloating">#BF000000</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/green</item>
<item name="colorSecondaryVariant">@color/red_dark</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>

View File

@ -5,6 +5,11 @@
<color name="red_dark">#B30000</color>
<color name="red">#DA0303</color>
<color name="blue">#FF0088FF</color>
<color name="yellow">#FFE500</color>
<color name="turquoise">#00FFF7</color>
<color name="orange">#FF7700</color>
<color name="pink">#D900FF</color>
<color name="green">#00FF0A</color>
<color name="teal_700">#870101</color>
<color name="colorOnBackgroundNight">#000000</color>
<color name="colorOnBackgroundDay">#FFFFFF</color>

View File

@ -47,7 +47,7 @@
<string name="sprache">LANGUAGE</string>
<string name="einstellungen_zurücksetzen">RESET SETTINGS</string>
<string name="button_zurücksetzen">RESET</string>
<string name="farbschema">COLORSCHEME</string>
<string name="themes">COLORSCHEME</string>
<string name="blau">BLUE</string>
<string name="rot">RED</string>
<string name="grün">GREEN</string>

View File

@ -1,6 +1,6 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.Teraplex" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<style name="Theme.red_blue" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="android:windowTranslucentStatus" tools:targetApi="kitkat">true</item>
<item name="android:windowTranslucentNavigation" tools:targetApi="kitkat">true</item>
@ -12,7 +12,7 @@
<item name="colorOnBackground">@color/colorOnBackgroundDay</item>
<item name="colorBackgroundFloating">#BFFFFFFF</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/red</item>
<item name="colorSecondary">@color/blue</item>
<item name="colorSecondaryVariant">@color/red_dark</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
@ -20,17 +20,133 @@
<!-- Customize your theme here. -->
</style>
<style name="Theme.Teraplex.NoActionBar">
<style name="Theme.red_blue.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="Theme.Teraplex.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="Theme.red_blue.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="Theme.Teraplex.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<style name="Theme.red_blue.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<style name="Theme.green_yellow.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="Theme.green_yellow.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="Theme.green_yellow.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<style name="PopupMenuStyle" parent="Theme.AppCompat.Light">
<item name="android:background">@color/white</item>
</style>
<style name="Theme.orange_turquoise.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="Theme.orange_turquoise.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="Theme.orange_turquoise.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<style name="Theme.yellow_blue.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="Theme.yellow_blue.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="Theme.yellow_blue.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<style name="Theme.pink_green.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="Theme.pink_green.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="Theme.pink_green.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<style name="Theme.green_yellow" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="android:windowTranslucentStatus" tools:targetApi="kitkat">true</item>
<item name="android:windowTranslucentNavigation" tools:targetApi="kitkat">true</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="colorPrimary">@color/green</item>
<item name="colorPrimaryVariant">@color/white</item>
<item name="colorOnPrimary">@color/black</item>
<item name="colorOnBackground">@color/colorOnBackgroundDay</item>
<item name="colorBackgroundFloating">#BFFFFFFF</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/yellow</item>
<item name="colorSecondaryVariant">@color/red_dark</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
<style name="Theme.orange_turquoise" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="android:windowTranslucentStatus" tools:targetApi="kitkat">true</item>
<item name="android:windowTranslucentNavigation" tools:targetApi="kitkat">true</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="colorPrimary">@color/orange</item>
<item name="colorPrimaryVariant">@color/white</item>
<item name="colorOnPrimary">@color/black</item>
<item name="colorOnBackground">@color/colorOnBackgroundDay</item>
<item name="colorBackgroundFloating">#BFFFFFFF</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/turquoise</item>
<item name="colorSecondaryVariant">@color/red_dark</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
<style name="Theme.yellow_blue" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="android:windowTranslucentStatus" tools:targetApi="kitkat">true</item>
<item name="android:windowTranslucentNavigation" tools:targetApi="kitkat">true</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="colorPrimary">@color/yellow</item>
<item name="colorPrimaryVariant">@color/white</item>
<item name="colorOnPrimary">@color/black</item>
<item name="colorOnBackground">@color/colorOnBackgroundDay</item>
<item name="colorBackgroundFloating">#BFFFFFFF</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/blue</item>
<item name="colorSecondaryVariant">@color/red_dark</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
<style name="Theme.pink_green" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="android:windowTranslucentStatus" tools:targetApi="kitkat">true</item>
<item name="android:windowTranslucentNavigation" tools:targetApi="kitkat">true</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="colorPrimary">@color/pink</item>
<item name="colorPrimaryVariant">@color/white</item>
<item name="colorOnPrimary">@color/black</item>
<item name="colorOnBackground">@color/colorOnBackgroundDay</item>
<item name="colorBackgroundFloating">#BFFFFFFF</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/green</item>
<item name="colorSecondaryVariant">@color/red_dark</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>