Compare commits

...
Sign in to create a new pull request.

5 commits

Author SHA1 Message Date
lizzie
bc78612fa7
fix
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-10-22 03:21:49 +00:00
lizzie
dcf507cecd
no need for 5 separate "learn more"
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-10-22 03:18:26 +00:00
lizzie
8641c9b321
fine no custom strings either
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-10-22 03:18:25 +00:00
lizzie
40f768ec9d
restore strings
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-10-22 03:18:24 +00:00
lizzie
aa3e2b48f7
[android] opinionated UI changes for startup and first-out of the box experience
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-10-22 03:18:22 +00:00
5 changed files with 32 additions and 38 deletions

View file

@ -35,6 +35,8 @@ object Settings {
const val PREF_FIRST_APP_LAUNCH = "FirstApplicationLaunch"
const val PREF_SHOULD_SHOW_DRIVER_WARNING = "ShouldShowDriverWarning"
const val PREF_SHOULD_SHOW_KEYS_MISSING_WARNING = "ShouldShowKeysMissingWarning"
const val PREF_SHOULD_SHOW_EDENS_VEIL_DIALOG = "ShouldShowEdensVeilDialog"
const val PREF_MEMORY_WARNING_SHOWN = "MemoryWarningShown"
const val SECTION_STATS_OVERLAY = "Stats Overlay"

View file

@ -96,19 +96,6 @@ class SetupFragment : Fragment() {
val pages = mutableListOf<SetupPage>()
pages.apply {
add(
SetupPage(
R.drawable.ic_yuzu_title,
R.string.welcome,
R.string.welcome_description,
0,
true,
R.string.get_started,
{ pageForward() },
false
)
)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
add(
SetupPage(
@ -127,9 +114,7 @@ class SetupFragment : Fragment() {
R.string.notification_warning_description,
0,
{
if (NotificationManagerCompat.from(requireContext())
.areNotificationsEnabled()
) {
if (NotificationManagerCompat.from(requireContext()).areNotificationsEnabled()) {
StepState.COMPLETE
} else {
StepState.INCOMPLETE
@ -154,7 +139,7 @@ class SetupFragment : Fragment() {
true,
R.string.install_prod_keys_warning,
R.string.install_prod_keys_warning_description,
R.string.install_prod_keys_warning_help,
0,
{
val file = File(DirectoryInitialization.userDirectory + "/keys/prod.keys")
if (file.exists() && NativeLibrary.areKeysPresent()) {
@ -180,7 +165,7 @@ class SetupFragment : Fragment() {
true,
R.string.install_firmware_warning,
R.string.install_firmware_warning_description,
R.string.install_firmware_warning_help,
0,
{
if (NativeLibrary.isFirmwareAvailable()) {
StepState.COMPLETE
@ -206,7 +191,7 @@ class SetupFragment : Fragment() {
true,
R.string.add_games_warning,
R.string.add_games_warning_description,
R.string.add_games_warning_help,
0,
{
if (NativeConfig.getGameDirs().isNotEmpty()) {
StepState.COMPLETE
@ -216,6 +201,8 @@ class SetupFragment : Fragment() {
}
)
)
// Needed because finishSetup()
add(
SetupPage(
R.drawable.ic_check,
@ -250,19 +237,16 @@ class SetupFragment : Fragment() {
override fun onPageSelected(position: Int) {
super.onPageSelected(position)
if (position == 1 && previousPosition == 0) {
ViewUtils.showView(binding.buttonNext)
ViewUtils.showView(binding.buttonBack)
} else if (position == 0 && previousPosition == 1) {
if (position == 0) {
ViewUtils.hideView(binding.buttonBack)
} else {
ViewUtils.showView(binding.buttonBack)
}
if (position == pages.size - 1) {
ViewUtils.hideView(binding.buttonNext)
} else if (position == pages.size - 1 && previousPosition == pages.size - 2) {
ViewUtils.hideView(binding.buttonNext)
} else if (position == pages.size - 2 && previousPosition == pages.size - 1) {
} else {
ViewUtils.showView(binding.buttonNext)
}
previousPosition = position
}
})

View file

@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@ -46,14 +49,6 @@ class SetupWarningDialogFragment : DialogFragment() {
if (descriptionId != 0) {
builder.setMessage(descriptionId)
}
if (helpLinkId != 0) {
builder.setNeutralButton(R.string.warning_help) { _: DialogInterface?, _: Int ->
val helpLink = resources.getString(R.string.install_prod_keys_warning_help)
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(helpLink))
startActivity(intent)
}
}
return builder.show()
}

View file

@ -202,11 +202,22 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
}
private fun checkKeys() {
if (!NativeLibrary.areKeysPresent()) {
val shouldDisplayKeysMissingWarning =
PreferenceManager.getDefaultSharedPreferences(applicationContext)
.getBoolean(Settings.PREF_SHOULD_SHOW_KEYS_MISSING_WARNING, true)
if (shouldDisplayKeysMissingWarning && !NativeLibrary.areKeysPresent()) {
MessageDialogFragment.newInstance(
this,
titleId = R.string.keys_missing,
descriptionId = R.string.keys_missing_description,
helpLinkId = R.string.keys_missing_help
positiveButtonTitleId = R.string.dont_show_again,
negativeButtonTitleId = R.string.close,
showNegativeButton = true,
positiveAction = {
PreferenceManager.getDefaultSharedPreferences(applicationContext).edit() {
putBoolean(Settings.PREF_SHOULD_SHOW_KEYS_MISSING_WARNING, false)
}
}
).show(supportFragmentManager, MessageDialogFragment.TAG)
}
}

View file

@ -266,6 +266,8 @@
<string name="view_carousel">Carousel</string>
<string name="game_image_desc">Screenshot for %1$s</string>
<string name="folder">Folder</string>
<string name="pre_alpha_warning_title">Pre-Alpha Software</string>
<string name="pre_alpha_warning_description">WARNING: This software is in the pre-alpha stage and may have bugs and incomplete feature implementations.</string>
<string name="dont_show_again">Don\'t Show Again</string>
<string name="add_directory_success">New game directory added successfully </string>
<string name="enable_update_checks">Check for updates on app startup.</string>