made statusbar and toolbar (bottom) black

and some bugfixes
This commit is contained in:
JG-Cody 2021-06-08 19:43:57 +02:00
parent e17596951c
commit 6f90cb957c
7 changed files with 278 additions and 259 deletions

View File

@ -9,6 +9,7 @@ import android.content.SharedPreferences;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.graphics.BitmapFactory; import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.BitmapDrawable;
import android.media.MediaPlayer;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.view.LayoutInflater; import android.view.LayoutInflater;
@ -85,7 +86,8 @@ public class EinstellungenFragment extends Fragment {
Reset.setOnClickListener(new View.OnClickListener() { Reset.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
MediaPlayer mp = MediaPlayer.create(getContext(), R.raw.alert_error);
mp.start();
AlertDialog mDialog = new AlertDialog.Builder(getContext()) AlertDialog mDialog = new AlertDialog.Builder(getContext())
.setTitle(R.string.reset_app) .setTitle(R.string.reset_app)
.setMessage(R.string.are_you_sure_to_reset) .setMessage(R.string.are_you_sure_to_reset)

View File

@ -6,6 +6,7 @@ import android.content.DialogInterface;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.graphics.BitmapFactory; import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.BitmapDrawable;
import android.media.MediaPlayer;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.view.LayoutInflater; import android.view.LayoutInflater;
@ -79,6 +80,8 @@ public class KonsoleFragment extends Fragment {
reboot_Button.setOnClickListener(new View.OnClickListener() { reboot_Button.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
MediaPlayer mp = MediaPlayer.create(getContext(), R.raw.state_change_confirm_up);
mp.start();
AlertDialog mDialog = new AlertDialog.Builder(getContext()) AlertDialog mDialog = new AlertDialog.Builder(getContext())
.setTitle("SERVER NEUSTARTEN") .setTitle("SERVER NEUSTARTEN")
.setMessage("BIST DU SICHER?") .setMessage("BIST DU SICHER?")
@ -88,6 +91,8 @@ public class KonsoleFragment extends Fragment {
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() { .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
try { try {
MediaPlayer mp = MediaPlayer.create(getContext(), R.raw.state_change_confirm_down);
mp.start();
Toast.makeText(getContext(), "Reboot wird ausgeführt...", Toast.LENGTH_SHORT).show(); Toast.makeText(getContext(), "Reboot wird ausgeführt...", Toast.LENGTH_SHORT).show();
SSH_connection.executeRemoteCommand(ip, user, password, "reboot"); SSH_connection.executeRemoteCommand(ip, user, password, "reboot");
} catch (Exception e) { } catch (Exception e) {
@ -113,7 +118,8 @@ public class KonsoleFragment extends Fragment {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
MediaPlayer mp = MediaPlayer.create(getContext(), R.raw.state_change_confirm_up);
mp.start();
AlertDialog mDialog = new AlertDialog.Builder(getContext()) AlertDialog mDialog = new AlertDialog.Builder(getContext())
.setTitle("SERVER HERUNTERFAHREN") .setTitle("SERVER HERUNTERFAHREN")
.setMessage("BIST DU SICHER?") .setMessage("BIST DU SICHER?")
@ -123,6 +129,8 @@ public class KonsoleFragment extends Fragment {
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() { .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
try { try {
MediaPlayer mp = MediaPlayer.create(getContext(), R.raw.state_change_confirm_down);
mp.start();
Toast.makeText(getContext(), "Server wird heruntergefahren...", Toast.LENGTH_SHORT).show(); Toast.makeText(getContext(), "Server wird heruntergefahren...", Toast.LENGTH_SHORT).show();
SSH_connection.executeRemoteCommand(ip, user, password, "shutdown now"); SSH_connection.executeRemoteCommand(ip, user, password, "shutdown now");
} catch (Exception e) { } catch (Exception e) {

View File

@ -19,8 +19,7 @@
app:layout_constraintVertical_bias="0.0" /> app:layout_constraintVertical_bias="0.0" />
<ScrollView
<ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
@ -161,7 +160,7 @@
android:id="@+id/TERAPLEX_Version" android:id="@+id/TERAPLEX_Version"
android:layout_width="250dp" android:layout_width="250dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="100dp" android:layout_marginTop="150dp"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:text="TERAPLEX v1.1.1" android:text="TERAPLEX v1.1.1"
android:textAlignment="center" android:textAlignment="center"
@ -297,6 +296,16 @@
app:layout_constraintStart_toStartOf="@+id/divider7" app:layout_constraintStart_toStartOf="@+id/divider7"
app:layout_constraintTop_toBottomOf="@+id/mail" /> app:layout_constraintTop_toBottomOf="@+id/mail" />
<Space
android:layout_width="100dp"
android:layout_height="100dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/JulianK"
app:layout_constraintVertical_bias="0.0" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView> </ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.