From ec81c6cf4410fa974bbe5ef3ab80bf6c46beda4a Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Tue, 9 May 2023 02:00:46 -0400 Subject: [PATCH] android: Use different icons for mainline/ea --- .../app/src/ea/res/drawable/ic_launcher.xml | 6 + .../yuzu/yuzu_emu/fragments/AboutFragment.kt | 10 + .../fragments/HomeSettingsFragment.kt | 8 + .../app/src/main/res/drawable/ic_icon_bg.xml | 751 ++++++++++++++++++ .../app/src/main/res/drawable/ic_launcher.xml | 2 +- .../app/src/main/res/drawable/ic_yuzu_ea.xml | 22 + .../src/main/res/drawable/ic_yuzu_ea_full.xml | 12 + .../main/res/drawable/ic_yuzu_ea_title.xml | 24 + .../res/layout/fragment_home_settings.xml | 1 + .../res/values/ic_launcher_background.xml | 4 - 10 files changed, 835 insertions(+), 5 deletions(-) create mode 100644 src/android/app/src/ea/res/drawable/ic_launcher.xml create mode 100644 src/android/app/src/main/res/drawable/ic_icon_bg.xml create mode 100644 src/android/app/src/main/res/drawable/ic_yuzu_ea.xml create mode 100644 src/android/app/src/main/res/drawable/ic_yuzu_ea_full.xml create mode 100644 src/android/app/src/main/res/drawable/ic_yuzu_ea_title.xml delete mode 100644 src/android/app/src/main/res/values/ic_launcher_background.xml diff --git a/src/android/app/src/ea/res/drawable/ic_launcher.xml b/src/android/app/src/ea/res/drawable/ic_launcher.xml new file mode 100644 index 0000000000..9d074c347f --- /dev/null +++ b/src/android/app/src/ea/res/drawable/ic_launcher.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/AboutFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/AboutFragment.kt index fc7c782a62..c2e0b96158 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/AboutFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/AboutFragment.kt @@ -15,6 +15,7 @@ import android.view.View import android.view.ViewGroup import android.view.ViewGroup.MarginLayoutParams import android.widget.Toast +import androidx.core.content.ContextCompat import androidx.core.view.ViewCompat import androidx.core.view.WindowInsetsCompat import androidx.core.view.updatePadding @@ -87,6 +88,15 @@ class AboutFragment : Fragment() { binding.buttonWebsite.setOnClickListener { openLink(getString(R.string.website_link)) } binding.buttonGithub.setOnClickListener { openLink(getString(R.string.github_link)) } + if (BuildConfig.PREMIUM) { + binding.imageLogo.setImageDrawable( + ContextCompat.getDrawable( + requireContext(), + R.drawable.ic_yuzu_ea_title + ) + ) + } + setInsets() } diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt index 3044ebf66c..7507d4635f 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt @@ -19,6 +19,7 @@ import androidx.appcompat.app.AppCompatActivity import androidx.core.app.ActivityCompat import androidx.core.app.NotificationCompat import androidx.core.app.NotificationManagerCompat +import androidx.core.content.ContextCompat import androidx.core.view.ViewCompat import androidx.core.view.WindowInsetsCompat import androidx.core.view.updatePadding @@ -120,6 +121,13 @@ class HomeSettingsFragment : Fragment() { ?.navigate(R.id.action_homeSettingsFragment_to_earlyAccessFragment) } ) + } else { + binding.logoImage.setImageDrawable( + ContextCompat.getDrawable( + requireContext(), + R.drawable.ic_yuzu_ea_full + ) + ) } binding.homeSettingsList.apply { diff --git a/src/android/app/src/main/res/drawable/ic_icon_bg.xml b/src/android/app/src/main/res/drawable/ic_icon_bg.xml new file mode 100644 index 0000000000..df62dde92e --- /dev/null +++ b/src/android/app/src/main/res/drawable/ic_icon_bg.xml @@ -0,0 +1,751 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/android/app/src/main/res/drawable/ic_launcher.xml b/src/android/app/src/main/res/drawable/ic_launcher.xml index c060cd86cd..3bb60fdfbb 100644 --- a/src/android/app/src/main/res/drawable/ic_launcher.xml +++ b/src/android/app/src/main/res/drawable/ic_launcher.xml @@ -1,6 +1,6 @@ - + diff --git a/src/android/app/src/main/res/drawable/ic_yuzu_ea.xml b/src/android/app/src/main/res/drawable/ic_yuzu_ea.xml new file mode 100644 index 0000000000..deb8ba53fd --- /dev/null +++ b/src/android/app/src/main/res/drawable/ic_yuzu_ea.xml @@ -0,0 +1,22 @@ + + + + diff --git a/src/android/app/src/main/res/drawable/ic_yuzu_ea_full.xml b/src/android/app/src/main/res/drawable/ic_yuzu_ea_full.xml new file mode 100644 index 0000000000..4ef4728769 --- /dev/null +++ b/src/android/app/src/main/res/drawable/ic_yuzu_ea_full.xml @@ -0,0 +1,12 @@ + + + + diff --git a/src/android/app/src/main/res/drawable/ic_yuzu_ea_title.xml b/src/android/app/src/main/res/drawable/ic_yuzu_ea_title.xml new file mode 100644 index 0000000000..29d0cfced8 --- /dev/null +++ b/src/android/app/src/main/res/drawable/ic_yuzu_ea_title.xml @@ -0,0 +1,24 @@ + + + + + + + + diff --git a/src/android/app/src/main/res/layout/fragment_home_settings.xml b/src/android/app/src/main/res/layout/fragment_home_settings.xml index 02200e885e..1cb421dcbe 100644 --- a/src/android/app/src/main/res/layout/fragment_home_settings.xml +++ b/src/android/app/src/main/res/layout/fragment_home_settings.xml @@ -17,6 +17,7 @@ android:background="?attr/colorSurface"> - - #FFFFFF -