Add strings for fragment names, Remove menu drawer on launch

This commit is contained in:
MrLetsplay 2023-09-21 21:16:56 +02:00
parent 13d06d8905
commit 7b6dccb2ff
Signed by: mr
SSH Key Fingerprint: SHA256:92jBH80vpXyaZHjaIl47pjRq+Yt7XGTArqQg1V7hSqg
6 changed files with 12 additions and 5 deletions

View File

@ -157,8 +157,6 @@ public class MainActivity extends BaseActivity {
}else {
NavigationUtil.navigate(this, HomeFragment.class, null);
}
new MenuDrawerFragment().show(getSupportFragmentManager(), null);
}
@Override

View File

@ -8,6 +8,7 @@ import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.cringe_studios.cringe_authenticator.R;
import com.cringe_studios.cringe_authenticator.databinding.FragmentAboutBinding;
public class AboutFragment extends NamedFragment {
@ -16,7 +17,7 @@ public class AboutFragment extends NamedFragment {
@Override
public String getName() {
return "About";
return requireActivity().getString(R.string.fragment_about);
}
@Nullable

View File

@ -7,6 +7,7 @@ import android.view.ViewGroup;
import androidx.annotation.NonNull;
import com.cringe_studios.cringe_authenticator.R;
import com.cringe_studios.cringe_authenticator.databinding.FragmentHomeBinding;
import com.cringe_studios.cringe_authenticator.util.FabUtil;
@ -16,7 +17,7 @@ public class HomeFragment extends NamedFragment {
@Override
public String getName() {
return "Home";
return requireActivity().getString(R.string.fragment_home);
}
@Override

View File

@ -17,6 +17,7 @@ import androidx.annotation.Nullable;
import androidx.biometric.BiometricManager;
import com.cringe_studios.cringe_authenticator.MainActivity;
import com.cringe_studios.cringe_authenticator.R;
import com.cringe_studios.cringe_authenticator.crypto.BiometricKey;
import com.cringe_studios.cringe_authenticator.crypto.Crypto;
import com.cringe_studios.cringe_authenticator.crypto.CryptoException;
@ -41,7 +42,7 @@ public class SettingsFragment extends NamedFragment {
@Override
public String getName() {
return "Settings";
return requireActivity().getString(R.string.fragment_settings);
}
@Nullable

View File

@ -71,4 +71,7 @@
<string name="add_code">Code hinzufügen</string>
<string name="settings">Einstellungen</string>
<string name="developed_by">Developed by Cringe Studios and JG-Cody</string>
<string name="fragment_home">Zuhause</string>
<string name="fragment_settings">Einstellungen</string>
<string name="fragment_about">Über</string>
</resources>

View File

@ -63,6 +63,9 @@
<string name="settings">Settings</string>
<string name="appearance">Appearance</string>
<string name="developed_by">Developed by Cringe Studios and JG-Cody</string>
<string name="fragment_home">Home</string>
<string name="fragment_settings">Settings</string>
<string name="fragment_about">About</string>
<string-array name="view_edit_move_delete">
<item>View</item>
<item>Edit</item>