strings hinzugefügt...

dynamische buttons vorbereitet und überarbeitet...
This commit is contained in:
JG-Cody 2021-06-11 19:07:06 +02:00
parent 86c71a5abb
commit fa70aad80e
8 changed files with 122 additions and 34 deletions

View File

@ -41,9 +41,12 @@ public class AddButtonDialog extends DialogFragment {
} }
}); });
editTextUsername = view.findViewById(R.id.button_name); editTextUsername = view.findViewById(R.id.button_name);
editTextPassword = view.findViewById(R.id.button_command); editTextPassword = view.findViewById(R.id.button_command);
return builder.create(); AlertDialog mDialog = builder.create();
mDialog.getWindow().setBackgroundDrawableResource(R.drawable.button_round);
return mDialog;
} }
@Override @Override

View File

@ -44,7 +44,9 @@ public class AddButtonsDialog extends DialogFragment {
editTextUsername = view.findViewById(R.id.button_name); editTextUsername = view.findViewById(R.id.button_name);
editTextPassword = view.findViewById(R.id.button_command); editTextPassword = view.findViewById(R.id.button_command);
return builder.create(); AlertDialog mDialog = builder.create();
mDialog.getWindow().setBackgroundDrawableResource(R.drawable.button_round);
return mDialog;
} }
@Override @Override

View File

@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:id="@+id/button1"
android:layout_width="100dp"
android:layout_height="40dp"
android:layout_margin="5dp"
android:layout_weight="1"
android:background="@drawable/button_left"
android:insetLeft="25dp"
android:insetRight="25dp"
android:text="Button1"
app:backgroundTint="@null" />
<Button
android:id="@+id/TEXT"
android:layout_width="100dp"
android:layout_height="40dp"
android:layout_margin="5dp"
android:layout_marginTop="5dp"
android:layout_weight="1"
android:background="@drawable/button_middle"
android:insetLeft="25dp"
android:insetRight="25dp"
android:text="Button2"
app:backgroundTint="@null" />
<Button
android:id="@+id/button"
android:layout_width="100dp"
android:layout_height="40dp"
android:layout_margin="5dp"
android:layout_weight="1"
android:background="@drawable/button_right"
android:insetLeft="25dp"
android:insetRight="25dp"
android:text="Button2"
app:backgroundTint="@null" />
<ImageView
android:id="@+id/image_remove"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center"
android:layout_margin="5dp"
app:srcCompat="@drawable/clear_black_24dp"
app:tint="?attr/colorOnPrimary"
tools:ignore="VectorDrawableCompat">
</ImageView>
</LinearLayout>

View File

@ -52,7 +52,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="25dp" android:layout_marginTop="25dp"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:text="LIZENZ" android:text="@string/licence"
android:textAlignment="center" android:textAlignment="center"
android:textColor="@color/mtrl_btn_text_color_selector" android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="18sp" android:textSize="18sp"
@ -81,7 +81,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="25dp" android:layout_marginTop="25dp"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:text="PROGRAMMCODE" android:text="@string/appcode"
android:textAlignment="center" android:textAlignment="center"
android:textColor="@color/mtrl_btn_text_color_selector" android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="18sp" android:textSize="18sp"
@ -108,7 +108,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="25dp" android:layout_marginTop="25dp"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:text="TEAM" android:text="@string/team"
android:textAlignment="center" android:textAlignment="center"
android:textColor="@color/mtrl_btn_text_color_selector" android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="18sp" android:textSize="18sp"
@ -148,7 +148,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="25dp" android:layout_marginTop="25dp"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:text="KONTAKT" android:text="@string/contact"
android:textAlignment="center" android:textAlignment="center"
android:textColor="@color/mtrl_btn_text_color_selector" android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="18sp" android:textSize="18sp"
@ -162,7 +162,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="150dp" android:layout_marginTop="150dp"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:text="TERAPLEX v1.1.1" android:text="@string/version"
android:textAlignment="center" android:textAlignment="center"
android:textColor="@color/mtrl_btn_text_color_selector" android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="18sp" android:textSize="18sp"
@ -177,7 +177,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="25dp" android:layout_marginTop="25dp"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:text="IN KOOPERATION WITH" android:text="@string/cooperation"
android:textAlignment="center" android:textAlignment="center"
android:textColor="@color/mtrl_btn_text_color_selector" android:textColor="@color/mtrl_btn_text_color_selector"
android:textSize="18sp" android:textSize="18sp"

View File

@ -141,7 +141,7 @@
android:layout_marginEnd="50dp" android:layout_marginEnd="50dp"
android:layout_marginRight="50dp" android:layout_marginRight="50dp"
android:background="@drawable/button_theme_red_blue" android:background="@drawable/button_theme_red_blue"
android:text="RED\nBLUE" android:text="@string/red_blue"
app:backgroundTint="@null" app:backgroundTint="@null"
app:layout_constraintBottom_toTopOf="@+id/button_theme_green_yellow" app:layout_constraintBottom_toTopOf="@+id/button_theme_green_yellow"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
@ -155,7 +155,7 @@
android:layout_marginEnd="50dp" android:layout_marginEnd="50dp"
android:layout_marginRight="50dp" android:layout_marginRight="50dp"
android:background="@drawable/button_theme_orange_turquoise" android:background="@drawable/button_theme_orange_turquoise"
android:text="ORANGE\nTURQUOISE" android:text="@string/orange_turquoise"
app:backgroundTint="@null" app:backgroundTint="@null"
app:layout_constraintBottom_toTopOf="@+id/button_theme_yellow_blue" app:layout_constraintBottom_toTopOf="@+id/button_theme_yellow_blue"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
@ -169,7 +169,7 @@
android:layout_marginEnd="50dp" android:layout_marginEnd="50dp"
android:layout_marginRight="50dp" android:layout_marginRight="50dp"
android:background="@drawable/button_theme_yellow_blue" android:background="@drawable/button_theme_yellow_blue"
android:text="YELLOW\nBLUE" android:text="@string/yellow_blue"
app:backgroundTint="@null" app:backgroundTint="@null"
app:layout_constraintBottom_toTopOf="@+id/button_theme_pink_green" app:layout_constraintBottom_toTopOf="@+id/button_theme_pink_green"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
@ -183,7 +183,7 @@
android:layout_marginEnd="50dp" android:layout_marginEnd="50dp"
android:layout_marginRight="50dp" android:layout_marginRight="50dp"
android:background="@drawable/button_theme_pink_green" android:background="@drawable/button_theme_pink_green"
android:text="PINK\nGREEN" android:text="@string/pink_green"
app:backgroundTint="@null" app:backgroundTint="@null"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button_theme_yellow_blue" /> app:layout_constraintTop_toBottomOf="@+id/button_theme_yellow_blue" />
@ -196,7 +196,7 @@
android:layout_marginEnd="50dp" android:layout_marginEnd="50dp"
android:layout_marginRight="50dp" android:layout_marginRight="50dp"
android:background="@drawable/button_theme_green_yellow" android:background="@drawable/button_theme_green_yellow"
android:text="GREEN\nYELLOW" android:text="@string/green_yellow"
app:backgroundTint="@null" app:backgroundTint="@null"
app:layout_constraintBottom_toTopOf="@+id/button_theme_orange_turquoise" app:layout_constraintBottom_toTopOf="@+id/button_theme_orange_turquoise"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"

View File

@ -35,4 +35,12 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" /> app:layout_constraintStart_toStartOf="parent" />
<LinearLayout
android:layout_width="394dp"
android:layout_height="10dp"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/Background"></LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -8,30 +8,38 @@
<Button <Button
android:id="@+id/button2" android:id="@+id/TEXT"
android:layout_width="299dp" android:layout_width="200dp"
android:layout_height="wrap_content" android:layout_height="40dp"
android:layout_margin="5dp"
android:layout_marginTop="5dp"
android:layout_weight="1" android:layout_weight="1"
android:background="@drawable/button_left"
android:insetLeft="25dp" android:insetLeft="25dp"
android:insetRight="25dp" android:insetRight="25dp"
android:text="Button1" /> android:text="TEXT"
app:backgroundTint="@null" />
<Button <Button
android:id="@+id/button3" android:id="@+id/button"
android:layout_width="299dp" android:layout_width="100dp"
android:layout_height="wrap_content" android:layout_height="40dp"
android:layout_margin="5dp"
android:layout_weight="1" android:layout_weight="1"
android:background="@drawable/button_right"
android:insetLeft="25dp" android:insetLeft="25dp"
android:insetRight="25dp" android:insetRight="25dp"
android:text="Button2" /> android:text="Button2"
app:backgroundTint="@null" />
<ImageView <ImageView
android:id="@+id/image_remove" android:id="@+id/image_remove"
android:layout_width="46dp" android:layout_width="40dp"
android:layout_height="48dp" android:layout_height="40dp"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_margin="5dp"
app:srcCompat="@drawable/clear_black_24dp" app:srcCompat="@drawable/clear_black_24dp"
app:tint="@color/black" app:tint="?attr/colorOnPrimary"
tools:ignore="VectorDrawableCompat"> tools:ignore="VectorDrawableCompat">
</ImageView> </ImageView>

View File

@ -48,13 +48,21 @@
<string name="einstellungen_zurücksetzen">RESET SETTINGS</string> <string name="einstellungen_zurücksetzen">RESET SETTINGS</string>
<string name="button_zurücksetzen">RESET</string> <string name="button_zurücksetzen">RESET</string>
<string name="themes">COLORSCHEME</string> <string name="themes">COLORSCHEME</string>
<string name="blau">BLUE</string> <string name="red_blue">RED\nBLUE</string>
<string name="rot">RED</string> <string name="green_yellow">GREEN\nYELLOW</string>
<string name="grün">GREEN</string> <string name="orange_turquoise">ORANGE\nTURQUOISE</string>
<string name="gelb">YELLOW</string> <string name="yellow_blue">YELLOW\nBLUE</string>
<string name="reset_app">RESET APP</string> <string name="pink_green">PINK\nGREEN</string>
<string name="reset_app">RESET\nAPP</string>
<string name="are_you_sure_to_reset">ARE YOU SURE YOU WANT TO RESET THE APP AND DELETE ALL YOUR SETTINGS?</string> <string name="are_you_sure_to_reset">ARE YOU SURE YOU WANT TO RESET THE APP AND DELETE ALL YOUR SETTINGS?</string>
//credits
<string name="version">TERAPLEX v1.1.1</string>
<string name="licence">LICENCE</string>
<string name="contact">CONTACT</string>
<string name="appcode">APPCODE</string>
<string name="team">TEAM</string>
<string name="cooperation">IN COOPERATION WITH</string>
<string name="menu_home">HOME</string> <string name="menu_home">HOME</string>
<string name="menu_konsole">CONSOLE</string> <string name="menu_konsole">CONSOLE</string>