From 4e030eba38ed5c0bdd14b7378e6d932670f11c91 Mon Sep 17 00:00:00 2001 From: MrLetsplay Date: Tue, 4 Jul 2023 21:19:56 +0200 Subject: [PATCH] Add settings labels, Add placeholder AboutFragment --- .../cringe_authenticator/MainActivity.java | 5 ++ .../fragment/AboutFragment.java | 28 +++++++++ app/src/main/res/layout/fragment_about.xml | 61 +++++++++++++++++++ app/src/main/res/layout/fragment_settings.xml | 10 +++ app/src/main/res/menu/menu_groups.xml | 6 ++ app/src/main/res/menu/menu_main.xml | 6 ++ app/src/main/res/values-de-rDE/strings.xml | 5 +- app/src/main/res/values/strings.xml | 3 +- 8 files changed, 122 insertions(+), 2 deletions(-) create mode 100644 app/src/main/java/com/cringe_studios/cringe_authenticator/fragment/AboutFragment.java create mode 100644 app/src/main/res/layout/fragment_about.xml diff --git a/app/src/main/java/com/cringe_studios/cringe_authenticator/MainActivity.java b/app/src/main/java/com/cringe_studios/cringe_authenticator/MainActivity.java index b46b757..bacf573 100644 --- a/app/src/main/java/com/cringe_studios/cringe_authenticator/MainActivity.java +++ b/app/src/main/java/com/cringe_studios/cringe_authenticator/MainActivity.java @@ -24,6 +24,7 @@ import androidx.fragment.app.Fragment; import com.cringe_studios.cringe_authenticator.databinding.ActivityMainBinding; import com.cringe_studios.cringe_authenticator.databinding.DialogInputCodeChoiceBinding; +import com.cringe_studios.cringe_authenticator.fragment.AboutFragment; import com.cringe_studios.cringe_authenticator.fragment.GroupFragment; import com.cringe_studios.cringe_authenticator.fragment.HomeFragment; import com.cringe_studios.cringe_authenticator.fragment.MenuFragment; @@ -182,6 +183,10 @@ public class MainActivity extends AppCompatActivity { NavigationUtil.navigate(this, SettingsFragment.class, null); } + public void openAbout(MenuItem item) { + NavigationUtil.navigate(this, AboutFragment.class, null); + } + public void scanCode() { startQRCodeScan.launch(null); } diff --git a/app/src/main/java/com/cringe_studios/cringe_authenticator/fragment/AboutFragment.java b/app/src/main/java/com/cringe_studios/cringe_authenticator/fragment/AboutFragment.java new file mode 100644 index 0000000..97b8a95 --- /dev/null +++ b/app/src/main/java/com/cringe_studios/cringe_authenticator/fragment/AboutFragment.java @@ -0,0 +1,28 @@ +package com.cringe_studios.cringe_authenticator.fragment; + +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + +import com.cringe_studios.cringe_authenticator.databinding.FragmentAboutBinding; + +public class AboutFragment extends NamedFragment { + + private FragmentAboutBinding binding; + + @Override + public String getName() { + return "About"; + } + + @Nullable + @Override + public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { + binding = FragmentAboutBinding.inflate(inflater); + return binding.getRoot(); + } +} diff --git a/app/src/main/res/layout/fragment_about.xml b/app/src/main/res/layout/fragment_about.xml new file mode 100644 index 0000000..d230d9c --- /dev/null +++ b/app/src/main/res/layout/fragment_about.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_settings.xml b/app/src/main/res/layout/fragment_settings.xml index e0e9e69..ed1dbb2 100644 --- a/app/src/main/res/layout/fragment_settings.xml +++ b/app/src/main/res/layout/fragment_settings.xml @@ -11,6 +11,11 @@ android:padding="16dp" android:orientation="vertical"> + + + + + \ No newline at end of file diff --git a/app/src/main/res/menu/menu_main.xml b/app/src/main/res/menu/menu_main.xml index 7e17392..045ecb7 100644 --- a/app/src/main/res/menu/menu_main.xml +++ b/app/src/main/res/menu/menu_main.xml @@ -8,4 +8,10 @@ android:title="@string/action_settings" app:showAsAction="never" android:onClick="openSettings" /> + \ No newline at end of file diff --git a/app/src/main/res/values-de-rDE/strings.xml b/app/src/main/res/values-de-rDE/strings.xml index 412accc..37e5599 100644 --- a/app/src/main/res/values-de-rDE/strings.xml +++ b/app/src/main/res/values-de-rDE/strings.xml @@ -2,6 +2,7 @@ Cringe Authenticator Einstellungen + Über Weiter Zurück Bearbeiten @@ -11,7 +12,6 @@ Nein Ja Ungültige Eingabe - Über Vibration App zurücksetzen Importieren / Exportieren @@ -36,6 +36,9 @@ Gruppe bearbeiten Intro-Video zeigen Biometrische Authentifizierung aktivieren + Code hinzugefügt + Code hinzufügen + Theme Anzeigen Bearbeiten diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index a7a12b9..138fa69 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,6 +1,7 @@ Cringe Authenticator Settings + About First Fragment Second Fragment @@ -51,7 +52,6 @@ No Yes Invalid Input - About Haptic Feedback Reset App Import / Export @@ -78,6 +78,7 @@ Require biometric unlock Code added Add Code + Theme View Edit