This commit is contained in:
JG-Cody 2021-06-04 14:48:06 +02:00
parent 8141734b9e
commit b90b3cfd92
21 changed files with 395 additions and 207 deletions

View File

@ -21,7 +21,6 @@ public class AddButtonDialog extends DialogFragment {
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
LayoutInflater inflater = getActivity().getLayoutInflater();
View view = inflater.inflate(R.layout.addbuttondialog, null);
@ -44,7 +43,6 @@ public class AddButtonDialog extends DialogFragment {
editTextUsername = view.findViewById(R.id.button_name);
editTextPassword = view.findViewById(R.id.button_command);
return builder.create();
}

View File

@ -161,13 +161,13 @@ public class MainActivity extends AppCompatActivity implements AddButtonDialog.A
}
public void openDialog1() {
AddButtonsDialog AddButtonsDialog = new AddButtonsDialog();
AddButtonsDialog.show(getSupportFragmentManager(), "example dialog");
AddButtonDialog AddButtonDialog = new AddButtonDialog();
AddButtonDialog.show(getSupportFragmentManager(), "example dialog");
}
public void openDialog2() {
AddButtonDialog AddButtonDialog = new AddButtonDialog();
AddButtonDialog.show(getSupportFragmentManager(), "example dialog");
AddButtonsDialog AddButtonsDialog = new AddButtonsDialog();
AddButtonsDialog.show(getSupportFragmentManager(), "example dialog");
}
@Override

View File

@ -117,9 +117,8 @@ public class EinstellungenFragment extends Fragment {
choose_background.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent i = new Intent(
Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
getActivity().startActivityForResult(i, MainActivity.RESULT_LOAD_IMAGE);
showChangeBackgroundDialog();
}
});
@ -156,6 +155,46 @@ public class EinstellungenFragment extends Fragment {
mDialog.show();
}
private void showChangeBackgroundDialog() {
final String[] listItems = {"FARBE", "GRAFIK", "RESET BACKGROUND"};
AlertDialog.Builder mBuilder = new AlertDialog.Builder(getContext());
mBuilder.setTitle("CHOOSE LANGUAGE");
mBuilder.setSingleChoiceItems(listItems, -5, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
if (i == 0) {
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) {
}
} else if (i == 1) {
Intent a = new Intent(
Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
getActivity().startActivityForResult(a, MainActivity.RESULT_LOAD_IMAGE);
} else if (i == 2) {
getContext().getSharedPreferences("appsettings", Context.MODE_PRIVATE).edit().remove("Background").commit();
startActivity(getActivity().getIntent());
getActivity().finish();
}
dialogInterface.dismiss();
}
});
AlertDialog mDialog = mBuilder.create();
mDialog.getWindow().setBackgroundDrawableResource(R.drawable.button_round);
mDialog.show();
}
private void setLocale(String lang) {
Locale locale = new Locale(lang);
Locale.setDefault(locale);

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="0dp"
android:color="#FFFFFF" />
<gradient
android:angle="180"
android:endColor="@color/purple_200"
android:startColor="#0088FF" />
<corners
android:bottomLeftRadius="0dp"
android:bottomRightRadius="0dp"
android:topLeftRadius="0dp"
android:topRightRadius="0dp" />
</shape>

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<stroke android:width="0dp"
android:color="#FFFFFF"/>
<solid
android:color="#BF000000"/>
<corners
android:bottomLeftRadius="00dp"
android:bottomRightRadius="0dp"
android:topLeftRadius="00dp"
android:topRightRadius="0dp" />
</shape>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<stroke android:width="0dp"
android:color="#FFFFFF"/>
<solid
android:color="?attr/colorBackgroundFloating"
android:alpha="0.0"/>
<corners
android:bottomLeftRadius="20dp"
android:bottomRightRadius="20dp"
android:topLeftRadius="20dp"
android:topRightRadius="20dp" />
</shape>

View File

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

View File

@ -7,8 +7,8 @@
android:color="#FFFFFF" />
<gradient
android:angle="180"
android:endColor="@color/purple_200"
android:startColor="@color/teal_200" />
android:endColor="?attr/colorPrimary"
android:startColor="?attr/colorPrimary" />
<corners
android:bottomLeftRadius="0dp"
android:bottomRightRadius="0dp"
@ -27,8 +27,8 @@
android:color="#FFFFFF" />
<gradient
android:angle="180"
android:endColor="@color/black"
android:startColor="@color/black" />
android:endColor="?attr/colorOnBackground"
android:startColor="?attr/colorOnBackground" />
<corners
android:bottomLeftRadius="0dp"
android:bottomRightRadius="0dp"

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="20dp"
@ -27,8 +27,8 @@
android:color="#FFFFFF" />
<gradient
android:angle="180"
android:endColor="@color/black"
android:startColor="@color/black" />
android:endColor="?attr/colorOnBackground"
android:startColor="?attr/colorOnBackground" />
<corners
android:bottomLeftRadius="0dp"
android:bottomRightRadius="20dp"

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="20dp"
android:bottomRightRadius="20dp"
@ -27,8 +27,8 @@
android:color="#FFFFFF" />
<gradient
android:angle="180"
android:endColor="@color/black"
android:startColor="@color/black" />
android:endColor="?attr/colorOnBackground"
android:startColor="?attr/colorOnBackground" />
<corners
android:bottomLeftRadius="20dp"
android:bottomRightRadius="20dp"

View File

@ -0,0 +1,38 @@
<?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="?attr/colorPrimary"
android:startColor="?attr/colorSecondary" />
<corners
android:bottomLeftRadius="0dp"
android:bottomRightRadius="0dp"
android:topLeftRadius="0dp"
android:topRightRadius="0dp" />
</shape>
</item>
<item
android:bottom="0dp"
android:left="0dp"
android:right="2dp"
android:top="0dp">
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="0dp"
android:color="#FFFFFF" />
<solid
android:color="@drawable/background"/>
<corners
android:bottomLeftRadius="0dp"
android:bottomRightRadius="0dp"
android:topLeftRadius="0dp"
android:topRightRadius="0dp" />
</shape>
</item>
</layer-list>

View File

@ -27,8 +27,8 @@
android:color="#FFFFFF" />
<gradient
android:angle="180"
android:endColor="@color/black"
android:startColor="@color/black" />
android:endColor="?attr/colorOnBackground"
android:startColor="?attr/colorOnBackground" />
<corners
android:bottomLeftRadius="0dp"
android:bottomRightRadius="0dp"

View File

@ -16,7 +16,9 @@
<include
android:id="@+id/include"
layout="@layout/content_main" />
layout="@layout/content_main"
app:layout_anchor="@+id/include"
app:layout_anchorGravity="center" />
<de.jg_cody.Teraplex.MovableFloatingActionButton
android:id="@+id/fab"
@ -33,6 +35,7 @@
android:layout_gravity="top|end"
android:layout_marginHorizontal="16dp"
android:layout_marginVertical="70dp"
android:background="@drawable/button_round"
android:hapticFeedbackEnabled="true"
android:src="@drawable/add_black_24dp" />

View File

@ -22,14 +22,20 @@
app:layout_constraintVertical_bias="0.0"/>
<ImageView
android:id="@drawable/backgroundalpha"
android:id="@drawable/backgroundoverlay"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="-25dp"
android:layout_marginLeft="-25dp"
android:layout_marginTop="-50dp"
android:layout_marginEnd="-25dp"
android:layout_marginRight="-25dp"
android:layout_marginBottom="-50dp"
android:scaleType="centerCrop"
android:src="@drawable/backgroundalpha"
android:src="@drawable/backgroundoverlay"
app:layout_constraintBottom_toBottomOf="@+id/Background"
app:layout_constraintEnd_toEndOf="@+id/cooperation"
app:layout_constraintStart_toStartOf="@+id/MatzeZ"
app:layout_constraintEnd_toEndOf="@+id/TERAPLEX_Version"
app:layout_constraintStart_toStartOf="@+id/TERAPLEX_Version"
app:layout_constraintTop_toTopOf="parent" />
<TextView
@ -40,7 +46,7 @@
android:gravity="center_horizontal"
android:text="LIZENZ"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@ -54,8 +60,9 @@
android:gravity="center_horizontal"
android:text=" ALL RIGHTS RESERVED"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="18sp"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="14sp"
app:drawableTint="@color/mtrl_btn_text_color_selector"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/lizenz" />
@ -68,7 +75,7 @@
android:gravity="center_horizontal"
android:text="PROGRAMMCODE"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@ -81,8 +88,8 @@
android:gravity="center_horizontal"
android:text="www.github.com"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="18sp"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="14sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/programmcode" />
@ -91,14 +98,13 @@
android:id="@+id/team"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="75dp"
android:layout_marginLeft="75dp"
android:layout_marginTop="25dp"
android:gravity="center_horizontal"
android:text="TEAM"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/divider5" />
@ -109,8 +115,8 @@
android:gravity="center_horizontal"
android:text="WEBSITE: jg-cody.de/teraplex"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="18sp"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="14sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintStart_toStartOf="parent"
@ -123,8 +129,8 @@
android:gravity="center_horizontal"
android:text="MAIL TO: info@jg-cody.de"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="18sp"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="@+id/mail"
app:layout_constraintTop_toBottomOf="@+id/contact2" />
@ -136,7 +142,7 @@
android:gravity="center_horizontal"
android:text="KONTAKT"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@ -144,16 +150,16 @@
<TextView
android:id="@+id/TERAPLEX_Version"
android:layout_width="wrap_content"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_marginTop="100dp"
android:gravity="center_horizontal"
android:text="TERAPLEX v1.1.1"
android:textAlignment="center"
android:textColor="@color/design_default_color_on_primary"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
@ -161,16 +167,14 @@
android:id="@+id/cooperation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:layout_marginEnd="20dp"
android:layout_marginRight="20dp"
android:gravity="center_horizontal"
android:text="IN KOOPERATION WITH"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="18sp"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="14sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/divider5" />
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/MatzeZ" />
<TextView
android:id="@+id/MatzeZ"
@ -179,7 +183,7 @@
android:gravity="center_horizontal"
android:text="Julian G. | Matze Z."
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="@+id/julianG"
app:layout_constraintStart_toStartOf="@+id/julianG"
@ -192,8 +196,8 @@
android:gravity="center_horizontal"
android:text="Julian K."
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="18sp"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="14sp"
app:layout_constraintEnd_toEndOf="@+id/imageView5"
app:layout_constraintHorizontal_bias="0.483"
app:layout_constraintStart_toStartOf="@+id/imageView5"
@ -206,8 +210,8 @@
android:gravity="center_horizontal"
android:text="www.jg-cody.de"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="18sp"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="14sp"
app:layout_constraintEnd_toEndOf="@+id/imageView3"
app:layout_constraintStart_toStartOf="@+id/imageView3"
app:layout_constraintTop_toBottomOf="@+id/team" />
@ -219,8 +223,8 @@
android:gravity="center_horizontal"
android:text="www.graphite-official.de"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="18sp"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="14sp"
app:layout_constraintEnd_toEndOf="@+id/cooperation"
app:layout_constraintStart_toStartOf="@+id/cooperation"
app:layout_constraintTop_toBottomOf="@+id/cooperation" />
@ -245,42 +249,42 @@
<View
android:id="@+id/divider5"
android:layout_width="409dp"
android:layout_height="1dp"
android:layout_width="0dp"
android:layout_height="2dp"
android:layout_marginTop="25dp"
android:background="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:background="@drawable/background_full"
app:layout_constraintEnd_toEndOf="@+id/divider9"
app:layout_constraintStart_toStartOf="@+id/divider9"
app:layout_constraintTop_toBottomOf="@+id/programmcode2" />
<View
android:id="@+id/divider6"
android:layout_width="409dp"
android:layout_height="1dp"
android:layout_width="0dp"
android:layout_height="2dp"
android:layout_marginTop="25dp"
android:background="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:background="@drawable/background_full"
app:layout_constraintEnd_toEndOf="@+id/TERAPLEX_Version"
app:layout_constraintStart_toStartOf="@+id/TERAPLEX_Version"
app:layout_constraintTop_toBottomOf="@+id/TERAPLEX_Version" />
<View
android:id="@+id/divider7"
android:layout_width="409dp"
android:layout_height="1dp"
android:layout_width="0dp"
android:layout_height="2dp"
android:layout_marginTop="25dp"
android:background="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:background="@drawable/background_full"
app:layout_constraintEnd_toEndOf="@+id/divider6"
app:layout_constraintStart_toStartOf="@+id/divider6"
app:layout_constraintTop_toBottomOf="@+id/lizenz2" />
<View
android:id="@+id/divider9"
android:layout_width="409dp"
android:layout_height="1dp"
android:layout_width="0dp"
android:layout_height="2dp"
android:layout_marginTop="25dp"
android:background="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:background="@drawable/background_full"
app:layout_constraintEnd_toEndOf="@+id/divider7"
app:layout_constraintStart_toStartOf="@+id/divider7"
app:layout_constraintTop_toBottomOf="@+id/mail" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -22,7 +22,7 @@
app:layout_constraintVertical_bias="0.0" />
<ImageView
android:id="@drawable/backgroundalpha"
android:id="@drawable/backgroundoverlay"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="-25dp"
@ -32,11 +32,13 @@
android:layout_marginRight="-25dp"
android:layout_marginBottom="-25dp"
android:scaleType="centerCrop"
android:src="@drawable/backgroundalpha"
android:src="@drawable/backgroundoverlay"
app:layout_constraintBottom_toBottomOf="@+id/button_blue"
app:layout_constraintEnd_toEndOf="@+id/button_colorpicker"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="@+id/colors"
app:layout_constraintTop_toTopOf="@+id/button_colorpicker" />
app:layout_constraintTop_toTopOf="@+id/button_colorpicker"
app:layout_constraintVertical_bias="0.0" />
<TextView
android:id="@+id/background"
@ -47,8 +49,8 @@
android:gravity="center_horizontal"
android:text="@string/hintergrund"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="20dp"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="18sp"
app:layout_constraintBottom_toTopOf="@+id/divider"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/divider2" />
@ -59,12 +61,13 @@
android:layout_height="wrap_content"
android:layout_marginStart="50dp"
android:layout_marginLeft="50dp"
android:layout_marginTop="75dp"
android:layout_marginTop="125dp"
android:layout_marginBottom="25dp"
android:gravity="center_horizontal"
android:text="@string/farben"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="20dp"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="18sp"
app:layout_constraintBottom_toTopOf="@+id/divider2"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
@ -78,8 +81,8 @@
android:gravity="center_horizontal"
android:text="@string/sprache"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="20dp"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="18sp"
app:layout_constraintBottom_toTopOf="@+id/divider3"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/divider" />
@ -93,8 +96,8 @@
android:gravity="center_horizontal"
android:text="@string/einstellungen_zurücksetzen"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="20dp"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="18sp"
app:layout_constraintBottom_toTopOf="@+id/divider4"
app:layout_constraintStart_toStartOf="@+id/Background"
app:layout_constraintTop_toBottomOf="@+id/divider3" />
@ -109,8 +112,8 @@
android:gravity="center_horizontal"
android:text="@string/farbschema"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="20dp"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="18sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/divider4" />
@ -225,42 +228,43 @@
<View
android:id="@+id/divider"
android:layout_width="409dp"
android:layout_height="1dp"
android:layout_width="0dp"
android:layout_height="2dp"
android:layout_marginTop="10dp"
android:background="@color/white"
app:layout_constraintTop_toBottomOf="@+id/button_pickimage"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"/>
android:background="@drawable/background_full"
app:layout_constraintEnd_toEndOf="@+id/divider2"
app:layout_constraintStart_toStartOf="@+id/divider2"
app:layout_constraintTop_toBottomOf="@+id/button_pickimage" />
<View
android:id="@+id/divider2"
android:layout_width="409dp"
android:layout_height="1dp"
android:layout_marginTop="10dp"
android:background="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:layout_width="0dp"
android:layout_height="2dp"
android:layout_marginTop="12dp"
android:background="@drawable/background_full"
app:layout_constraintEnd_toEndOf="@+id/button_colorpicker"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="@+id/colors"
app:layout_constraintTop_toBottomOf="@+id/button_colorpicker" />
<View
android:id="@+id/divider3"
android:layout_width="409dp"
android:layout_height="1dp"
android:layout_width="0dp"
android:layout_height="2dp"
android:layout_marginTop="10dp"
android:background="@color/white"
app:layout_constraintTop_toBottomOf="@+id/button_language"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"/>
android:background="@drawable/background_full"
app:layout_constraintEnd_toEndOf="@+id/divider"
app:layout_constraintStart_toStartOf="@+id/divider"
app:layout_constraintTop_toBottomOf="@+id/button_language" />
<View
android:id="@+id/divider4"
android:layout_width="409dp"
android:layout_height="1dp"
android:layout_width="0dp"
android:layout_height="2dp"
android:layout_marginTop="10dp"
android:background="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:background="@drawable/background_full"
app:layout_constraintEnd_toEndOf="@+id/divider3"
app:layout_constraintStart_toStartOf="@+id/divider3"
app:layout_constraintTop_toBottomOf="@+id/button_reset" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -24,55 +24,74 @@
<ImageView
android:id="@drawable/backgroundalpha"
android:id="@drawable/backgroundoverlay"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginBottom="-25dp"
android:layout_marginLeft="-25dp"
android:layout_marginTop="-25dp"
android:layout_marginRight="-25dp"
android:layout_marginBottom="-25dp"
android:scaleType="centerCrop"
android:src="@drawable/button_round"
android:src="@drawable/backgroundoverlay"
app:layout_constraintBottom_toBottomOf="@+id/logoutButton"
app:layout_constraintEnd_toEndOf="@+id/ipInput"
app:layout_constraintStart_toStartOf="@+id/ipInput"
app:layout_constraintTop_toTopOf="@+id/text_home" />
<ImageView
android:id="@drawable/backgroundoverlay"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="-25dp"
android:layout_marginLeft="-25dp"
android:layout_marginTop="-25dp"
android:layout_marginEnd="-25dp"
android:layout_marginRight="-25dp"
android:layout_marginBottom="-25dp"
android:scaleType="centerCrop"
android:src="@drawable/backgroundoverlay"
app:layout_constraintBottom_toBottomOf="@+id/textView7"
app:layout_constraintEnd_toEndOf="@+id/wlan_an"
app:layout_constraintStart_toStartOf="@+id/wlan_aus"
app:layout_constraintTop_toTopOf="@+id/textView5" />
<TextView
android:id="@+id/text_home"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="50dp"
android:gravity="center_horizontal"
android:text="@string/Welcome_to_your_HOMEAUTOMATION_APP"
android:textAlignment="center"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="20sp"
app:layout_constraintBottom_toTopOf="@+id/ipInput"
app:layout_constraintEnd_toEndOf="@+id/ipInput"
app:layout_constraintStart_toStartOf="@+id/ipInput"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/text_home"
android:layout_width="309dp"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="@string/Welcome_to_your_HOMEAUTOMATION_APP"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="20sp"
app:layout_constraintBottom_toTopOf="@+id/ipInput"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/login_data"
android:layout_width="204dp"
android:layout_height="46dp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:textAlignment="center"
android:textColor="#00FF00"
android:textSize="14sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="@+id/ipInput"
app:layout_constraintStart_toStartOf="@+id/ipInput"
app:layout_constraintTop_toBottomOf="@+id/text_home" />
<EditText
android:id="@+id/ipInput"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="#FFFFFF"
android:ems="10"
android:hint="@string/login_ipadresse"
android:inputType="text"
android:textColor="#FFFFFF"
android:textColorHint="#FFFFFF"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textColorHint="@color/mtrl_btn_text_color_selector"
android:backgroundTint="@color/mtrl_btn_text_color_selector"
app:layout_constraintBottom_toTopOf="@+id/loginuserInput"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
@ -82,12 +101,13 @@
android:id="@+id/loginuserInput"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="#FFFFFF"
android:backgroundTint="@color/mtrl_btn_text_color_selector"
android:ems="10"
android:hint="@string/login_benutzername"
android:inputType="textEmailAddress"
android:textColor="#FFFFFF"
android:textColorHint="#FFFFFF"
android:singleLine="false"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textColorHint="@color/mtrl_btn_text_color_selector"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
@ -99,12 +119,12 @@
android:id="@+id/loginpasswordInput"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="#FFFFFF"
android:backgroundTint="@color/mtrl_btn_text_color_selector"
android:ems="10"
android:hint="@string/login_passwort"
android:inputType="textPassword"
android:textColor="#FFFFFF"
android:textColorHint="#FFFFFF"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textColorHint="@color/mtrl_btn_text_color_selector"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintStart_toStartOf="parent"
@ -142,8 +162,8 @@
android:id="@+id/wlan_an"
android:layout_width="100dp"
android:layout_height="40dp"
android:layout_marginStart="10dp"
android:layout_marginLeft="10dp"
android:layout_marginStart="5dp"
android:layout_marginLeft="5dp"
android:background="@drawable/button_right"
android:drawableRight="@drawable/signal_wifi_statusbar_4_bar_24px"
android:drawableTint="@color/mtrl_btn_text_color_selector"
@ -158,8 +178,8 @@
android:id="@+id/kodian"
android:layout_width="100dp"
android:layout_height="40dp"
android:layout_marginStart="10dp"
android:layout_marginLeft="10dp"
android:layout_marginStart="5dp"
android:layout_marginLeft="5dp"
android:background="@drawable/button_right"
android:drawableRight="@drawable/kodi"
android:drawableTint="@color/mtrl_btn_text_color_selector"
@ -174,8 +194,8 @@
android:id="@+id/wlan_aus"
android:layout_width="100dp"
android:layout_height="40dp"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:layout_marginEnd="5dp"
android:layout_marginRight="5dp"
android:background="@drawable/button_left"
android:drawableLeft="@drawable/signal_wifi_off_24px"
android:drawableTint="@color/mtrl_btn_text_color_selector"
@ -190,8 +210,8 @@
android:id="@+id/kodiaus"
android:layout_width="100dp"
android:layout_height="40dp"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:layout_marginEnd="5dp"
android:layout_marginRight="5dp"
android:background="@drawable/button_left"
android:drawableLeft="@drawable/kodi_aus_1_"
android:drawableTint="@color/mtrl_btn_text_color_selector"

View File

@ -22,27 +22,29 @@
app:layout_constraintVertical_bias="0.0" />
<ImageView
android:id="@drawable/backgroundalpha"
android:id="@drawable/backgroundoverlay"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="-25dp"
android:layout_marginLeft="-25dp"
android:layout_marginTop="-25dp"
android:layout_marginEnd="-25dp"
android:layout_marginRight="-25dp"
android:layout_marginBottom="-25dp"
android:scaleType="centerCrop"
android:src="@drawable/backgroundalpha"
android:src="@drawable/backgroundoverlay"
app:layout_constraintBottom_toBottomOf="@+id/shutdown"
app:layout_constraintEnd_toEndOf="@+id/Serverbefehle"
app:layout_constraintStart_toStartOf="@+id/Serverbefehle"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="@+id/textView6" />
<Button
android:id="@+id/shutdown"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginLeft="10dp"
android:layout_marginStart="5dp"
android:layout_marginLeft="5dp"
android:layout_marginTop="10dp"
android:background="@drawable/button_right"
android:hapticFeedbackEnabled="true"
android:text="@string/shutdown"
@ -56,6 +58,7 @@
android:id="@+id/reboot"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@drawable/button_left"
android:hapticFeedbackEnabled="true"
android:text="@string/reboot"
@ -69,11 +72,11 @@
android:id="@+id/befehlInput"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="#FFFFFF"
android:backgroundTint="@color/mtrl_btn_text_color_selector"
android:ems="10"
android:inputType="text"
android:textColor="#FFFFFF"
android:textColorHint="#FFFFFF"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textColorHint="@color/mtrl_btn_text_color_selector"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
@ -87,7 +90,7 @@
android:gravity="center_horizontal"
android:text="@string/konsole"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="20sp"
app:layout_constraintBottom_toTopOf="@+id/befehlInput"
app:layout_constraintEnd_toEndOf="parent"
@ -97,20 +100,22 @@
android:id="@+id/Serverbefehle"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_marginTop="100dp"
android:layout_marginTop="25dp"
android:gravity="center_horizontal"
android:text="@string/serverbefehle"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="20sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.504"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/SendCommandButton" />
app:layout_constraintTop_toBottomOf="@+id/divider8" />
<Button
android:id="@+id/SendCommandButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@drawable/button_round"
android:hapticFeedbackEnabled="true"
android:text="@string/button_send_command"
@ -122,13 +127,31 @@
<ImageView
android:id="@+id/imageView2"
android:layout_width="424dp"
android:layout_height="293dp"
android:layout_marginTop="100dp"
android:layout_width="500dp"
android:layout_height="500dp"
android:layout_marginStart="-50dp"
android:layout_marginLeft="-50dp"
android:layout_marginEnd="-50dp"
android:layout_marginRight="-50dp"
android:layout_marginBottom="-125dp"
android:src="@drawable/teraplex_sidebar"
app:layout_constraintBottom_toTopOf="@+id/textView6"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<View
android:id="@+id/divider8"
android:layout_width="0dp"
android:layout_height="2dp"
android:layout_marginStart="50dp"
android:layout_marginLeft="50dp"
android:layout_marginTop="25dp"
android:layout_marginEnd="50dp"
android:layout_marginRight="50dp"
android:background="@drawable/background_full"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toBottomOf="@+id/SendCommandButton" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -16,20 +16,37 @@
android:src="@drawable/background"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0" />
app:layout_constraintVertical_bias="1.0" />
<ImageView
android:id="@drawable/backgroundoverlay"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="-25dp"
android:layout_marginLeft="-25dp"
android:layout_marginTop="-25dp"
android:layout_marginEnd="-25dp"
android:layout_marginRight="-25dp"
android:layout_marginBottom="-25dp"
android:scaleType="centerCrop"
android:src="@drawable/backgroundoverlay"
app:layout_constraintBottom_toBottomOf="@+id/sendtimedcommand"
app:layout_constraintEnd_toEndOf="@+id/divider10"
app:layout_constraintStart_toStartOf="@+id/divider10"
app:layout_constraintTop_toTopOf="@+id/textView10" />
<EditText
android:id="@+id/befehlInput2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="#FFFFFF"
android:backgroundTint="@color/mtrl_btn_text_color_selector"
android:ems="10"
android:inputType="text"
android:textColor="#FFFFFF"
android:textColorHint="#FFFFFF"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textColorHint="@color/mtrl_btn_text_color_selector"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintStart_toStartOf="parent"
@ -39,16 +56,17 @@
android:id="@+id/textView8"
android:layout_width="253dp"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:gravity="center_horizontal"
android:text="@string/befehl"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="20sp"
app:layout_constraintBottom_toTopOf="@+id/befehlInput2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.506"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/timePicker" />
app:layout_constraintTop_toBottomOf="@+id/divider10" />
<TextView
android:id="@+id/textView10"
@ -57,7 +75,7 @@
android:gravity="center_horizontal"
android:text="@string/zeitgesteuerte_kommandos"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="20sp"
app:layout_constraintBottom_toTopOf="@+id/timePicker"
app:layout_constraintEnd_toEndOf="parent"
@ -68,9 +86,11 @@
android:id="@+id/sendtimedcommand"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:background="@drawable/button_round"
android:hapticFeedbackEnabled="true"
android:text="@string/send_timed_command"
app:backgroundTint="@null"
app:icon="@drawable/send_24px"
app:layout_constraintEnd_toEndOf="@+id/befehlInput2"
app:layout_constraintStart_toStartOf="@+id/befehlInput2"
@ -80,8 +100,9 @@
android:id="@+id/timePicker"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:amPmTextColor="@color/white"
android:numbersSelectorColor="@color/white"
android:layout_marginBottom="125dp"
android:amPmTextColor="@color/mtrl_btn_text_color_selector"
android:numbersSelectorColor="@color/mtrl_btn_text_color_selector"
android:timePickerMode="spinner"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
@ -89,5 +110,19 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/divider10"
android:layout_width="0dp"
android:layout_height="2dp"
android:layout_marginStart="50dp"
android:layout_marginLeft="50dp"
android:layout_marginEnd="50dp"
android:layout_marginRight="50dp"
android:background="@drawable/background_full"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/timePicker" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -2,12 +2,14 @@
<!-- Base application theme. -->
<style name="Theme.Teraplex" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_200</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorPrimary">@color/red</item>
<item name="colorPrimaryVariant">@color/red_dark</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/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_200</item>
<item name="colorSecondary">@color/blue</item>
<item name="colorSecondaryVariant">@color/blue</item>
<item name="colorOnSecondary">@color/white</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>

View File

@ -2,9 +2,12 @@
<resources>
<color name="purple_200">#EE0000</color>
<color name="purple_500">#EE0000</color>
<color name="purple_700">#B30000</color>
<color name="teal_200">#DA0303</color>
<color name="red_dark">#B30000</color>
<color name="red">#DA0303</color>
<color name="blue">#FF0088FF</color>
<color name="teal_700">#870101</color>
<color name="colorOnBackgroundNight">#000000</color>
<color name="colorOnBackgroundDay">#FFFFFF</color>
<color name="black">#000000</color>
<color name="white">#FFFFFF</color>

View File

@ -2,12 +2,14 @@
<!-- Base application theme. -->
<style name="Theme.Teraplex" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/teal_200</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorPrimary">@color/red</item>
<item name="colorPrimaryVariant">@color/red_dark</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/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_700</item>
<item name="colorSecondary">@color/red</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>
@ -24,7 +26,7 @@
<style name="Theme.Teraplex.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<style name="PopupMenuStyle" parent="Theme.AppCompat.Light">
<item name="android:background">@android:color/white</item>
<item name="android:background">@color/white</item>
</style>
</resources>