diff options
| author | 2023-05-08 04:49:32 -0400 | |
|---|---|---|
| committer | 2023-06-03 00:06:00 -0700 | |
| commit | f69bc78dc56eaf2a6e33f0bcee1ba1dd812fd9b4 (patch) | |
| tree | 30faabf47a68d9a01324c3f84edec1874af21365 /src/android | |
| parent | android: vulkan_device: Only compile OverrideBcnFormats when used. (diff) | |
| download | yuzu-f69bc78dc56eaf2a6e33f0bcee1ba1dd812fd9b4.tar.gz yuzu-f69bc78dc56eaf2a6e33f0bcee1ba1dd812fd9b4.tar.xz yuzu-f69bc78dc56eaf2a6e33f0bcee1ba1dd812fd9b4.zip | |
android: Add early access upgrade fragment
We now have a second build flavor that will determine whether the "Get Early Access" button appears.
Diffstat (limited to 'src/android')
13 files changed, 419 insertions, 2 deletions
diff --git a/src/android/app/build.gradle.kts b/src/android/app/build.gradle.kts index a9790b200..8c970609f 100644 --- a/src/android/app/build.gradle.kts +++ b/src/android/app/build.gradle.kts | |||
| @@ -112,6 +112,12 @@ android { | |||
| 112 | productFlavors { | 112 | productFlavors { |
| 113 | create("mainline") { | 113 | create("mainline") { |
| 114 | dimension = "version" | 114 | dimension = "version" |
| 115 | buildConfigField("Boolean", "PREMIUM", "false") | ||
| 116 | } | ||
| 117 | |||
| 118 | create("ea") { | ||
| 119 | dimension = "version" | ||
| 120 | buildConfigField("Boolean", "PREMIUM", "true") | ||
| 115 | } | 121 | } |
| 116 | } | 122 | } |
| 117 | 123 | ||
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/adapters/HomeSettingAdapter.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/adapters/HomeSettingAdapter.kt index 2b3956e6d..b719dd539 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/adapters/HomeSettingAdapter.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/adapters/HomeSettingAdapter.kt | |||
| @@ -1,11 +1,16 @@ | |||
| 1 | // SPDX-FileCopyrightText: 2023 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 1 | package org.yuzu.yuzu_emu.adapters | 4 | package org.yuzu.yuzu_emu.adapters |
| 2 | 5 | ||
| 3 | import android.view.LayoutInflater | 6 | import android.view.LayoutInflater |
| 4 | import android.view.View | 7 | import android.view.View |
| 5 | import android.view.ViewGroup | 8 | import android.view.ViewGroup |
| 6 | import androidx.appcompat.app.AppCompatActivity | 9 | import androidx.appcompat.app.AppCompatActivity |
| 10 | import androidx.core.content.ContextCompat | ||
| 7 | import androidx.core.content.res.ResourcesCompat | 11 | import androidx.core.content.res.ResourcesCompat |
| 8 | import androidx.recyclerview.widget.RecyclerView | 12 | import androidx.recyclerview.widget.RecyclerView |
| 13 | import org.yuzu.yuzu_emu.R | ||
| 9 | import org.yuzu.yuzu_emu.databinding.CardHomeOptionBinding | 14 | import org.yuzu.yuzu_emu.databinding.CardHomeOptionBinding |
| 10 | import org.yuzu.yuzu_emu.model.HomeSetting | 15 | import org.yuzu.yuzu_emu.model.HomeSetting |
| 11 | 16 | ||
| @@ -13,7 +18,8 @@ class HomeSettingAdapter(private val activity: AppCompatActivity, var options: L | |||
| 13 | RecyclerView.Adapter<HomeSettingAdapter.HomeOptionViewHolder>(), | 18 | RecyclerView.Adapter<HomeSettingAdapter.HomeOptionViewHolder>(), |
| 14 | View.OnClickListener { | 19 | View.OnClickListener { |
| 15 | override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): HomeOptionViewHolder { | 20 | override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): HomeOptionViewHolder { |
| 16 | val binding = CardHomeOptionBinding.inflate(LayoutInflater.from(parent.context), parent, false) | 21 | val binding = |
| 22 | CardHomeOptionBinding.inflate(LayoutInflater.from(parent.context), parent, false) | ||
| 17 | binding.root.setOnClickListener(this) | 23 | binding.root.setOnClickListener(this) |
| 18 | return HomeOptionViewHolder(binding) | 24 | return HomeOptionViewHolder(binding) |
| 19 | } | 25 | } |
| @@ -50,6 +56,14 @@ class HomeSettingAdapter(private val activity: AppCompatActivity, var options: L | |||
| 50 | activity.theme | 56 | activity.theme |
| 51 | ) | 57 | ) |
| 52 | ) | 58 | ) |
| 59 | |||
| 60 | when (option.titleId) { | ||
| 61 | R.string.get_early_access -> binding.optionLayout.background = | ||
| 62 | ContextCompat.getDrawable( | ||
| 63 | binding.optionCard.context, | ||
| 64 | R.drawable.premium_background | ||
| 65 | ) | ||
| 66 | } | ||
| 53 | } | 67 | } |
| 54 | } | 68 | } |
| 55 | } | 69 | } |
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EarlyAccessFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EarlyAccessFragment.kt new file mode 100644 index 000000000..d8bbc1ce4 --- /dev/null +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EarlyAccessFragment.kt | |||
| @@ -0,0 +1,83 @@ | |||
| 1 | // SPDX-FileCopyrightText: 2023 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | package org.yuzu.yuzu_emu.fragments | ||
| 5 | |||
| 6 | import android.content.Intent | ||
| 7 | import android.net.Uri | ||
| 8 | import android.os.Bundle | ||
| 9 | import android.view.LayoutInflater | ||
| 10 | import android.view.View | ||
| 11 | import android.view.ViewGroup | ||
| 12 | import androidx.core.view.ViewCompat | ||
| 13 | import androidx.core.view.WindowInsetsCompat | ||
| 14 | import androidx.core.view.updatePadding | ||
| 15 | import androidx.fragment.app.Fragment | ||
| 16 | import androidx.fragment.app.activityViewModels | ||
| 17 | import androidx.navigation.fragment.findNavController | ||
| 18 | import com.google.android.material.transition.MaterialSharedAxis | ||
| 19 | import org.yuzu.yuzu_emu.R | ||
| 20 | import org.yuzu.yuzu_emu.databinding.FragmentEarlyAccessBinding | ||
| 21 | import org.yuzu.yuzu_emu.model.HomeViewModel | ||
| 22 | |||
| 23 | class EarlyAccessFragment : Fragment() { | ||
| 24 | private var _binding: FragmentEarlyAccessBinding? = null | ||
| 25 | private val binding get() = _binding!! | ||
| 26 | |||
| 27 | private val homeViewModel: HomeViewModel by activityViewModels() | ||
| 28 | |||
| 29 | override fun onCreate(savedInstanceState: Bundle?) { | ||
| 30 | super.onCreate(savedInstanceState) | ||
| 31 | enterTransition = MaterialSharedAxis(MaterialSharedAxis.X, true) | ||
| 32 | returnTransition = MaterialSharedAxis(MaterialSharedAxis.X, false) | ||
| 33 | } | ||
| 34 | |||
| 35 | override fun onCreateView( | ||
| 36 | inflater: LayoutInflater, | ||
| 37 | container: ViewGroup?, | ||
| 38 | savedInstanceState: Bundle? | ||
| 39 | ): View { | ||
| 40 | _binding = FragmentEarlyAccessBinding.inflate(layoutInflater) | ||
| 41 | return binding.root | ||
| 42 | } | ||
| 43 | |||
| 44 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | ||
| 45 | homeViewModel.setNavigationVisibility(visible = false, animated = true) | ||
| 46 | homeViewModel.setStatusBarShadeVisibility(visible = false) | ||
| 47 | |||
| 48 | binding.toolbarAbout.setNavigationOnClickListener { | ||
| 49 | parentFragmentManager.primaryNavigationFragment?.findNavController()?.popBackStack() | ||
| 50 | } | ||
| 51 | |||
| 52 | binding.getEarlyAccessButton.setOnClickListener { openLink(getString(R.string.play_store_link)) } | ||
| 53 | |||
| 54 | setInsets() | ||
| 55 | } | ||
| 56 | |||
| 57 | private fun openLink(link: String) { | ||
| 58 | val intent = Intent(Intent.ACTION_VIEW, Uri.parse(link)) | ||
| 59 | startActivity(intent) | ||
| 60 | } | ||
| 61 | |||
| 62 | private fun setInsets() = | ||
| 63 | ViewCompat.setOnApplyWindowInsetsListener(binding.root) { _: View, windowInsets: WindowInsetsCompat -> | ||
| 64 | val barInsets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars()) | ||
| 65 | val cutoutInsets = windowInsets.getInsets(WindowInsetsCompat.Type.displayCutout()) | ||
| 66 | |||
| 67 | val leftInsets = barInsets.left + cutoutInsets.left | ||
| 68 | val rightInsets = barInsets.right + cutoutInsets.right | ||
| 69 | |||
| 70 | val mlpAppBar = binding.appbarEa.layoutParams as ViewGroup.MarginLayoutParams | ||
| 71 | mlpAppBar.leftMargin = leftInsets | ||
| 72 | mlpAppBar.rightMargin = rightInsets | ||
| 73 | binding.appbarEa.layoutParams = mlpAppBar | ||
| 74 | |||
| 75 | binding.scrollEa.updatePadding( | ||
| 76 | left = leftInsets, | ||
| 77 | right = rightInsets, | ||
| 78 | bottom = barInsets.bottom | ||
| 79 | ) | ||
| 80 | |||
| 81 | windowInsets | ||
| 82 | } | ||
| 83 | } | ||
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 ae920d692..3044ebf66 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 | |||
| @@ -28,6 +28,7 @@ import androidx.navigation.fragment.findNavController | |||
| 28 | import androidx.recyclerview.widget.LinearLayoutManager | 28 | import androidx.recyclerview.widget.LinearLayoutManager |
| 29 | import com.google.android.material.dialog.MaterialAlertDialogBuilder | 29 | import com.google.android.material.dialog.MaterialAlertDialogBuilder |
| 30 | import com.google.android.material.transition.MaterialSharedAxis | 30 | import com.google.android.material.transition.MaterialSharedAxis |
| 31 | import org.yuzu.yuzu_emu.BuildConfig | ||
| 31 | import org.yuzu.yuzu_emu.R | 32 | import org.yuzu.yuzu_emu.R |
| 32 | import org.yuzu.yuzu_emu.adapters.HomeSettingAdapter | 33 | import org.yuzu.yuzu_emu.adapters.HomeSettingAdapter |
| 33 | import org.yuzu.yuzu_emu.databinding.FragmentHomeSettingsBinding | 34 | import org.yuzu.yuzu_emu.databinding.FragmentHomeSettingsBinding |
| @@ -64,7 +65,7 @@ class HomeSettingsFragment : Fragment() { | |||
| 64 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | 65 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { |
| 65 | mainActivity = requireActivity() as MainActivity | 66 | mainActivity = requireActivity() as MainActivity |
| 66 | 67 | ||
| 67 | val optionsList: List<HomeSetting> = listOf( | 68 | val optionsList: MutableList<HomeSetting> = mutableListOf( |
| 68 | HomeSetting( | 69 | HomeSetting( |
| 69 | R.string.advanced_settings, | 70 | R.string.advanced_settings, |
| 70 | R.string.settings_description, | 71 | R.string.settings_description, |
| @@ -106,6 +107,21 @@ class HomeSettingsFragment : Fragment() { | |||
| 106 | } | 107 | } |
| 107 | ) | 108 | ) |
| 108 | 109 | ||
| 110 | if (!BuildConfig.PREMIUM) { | ||
| 111 | optionsList.add( | ||
| 112 | 0, | ||
| 113 | HomeSetting( | ||
| 114 | R.string.get_early_access, | ||
| 115 | R.string.get_early_access_description, | ||
| 116 | R.drawable.ic_diamond | ||
| 117 | ) { | ||
| 118 | exitTransition = MaterialSharedAxis(MaterialSharedAxis.X, true) | ||
| 119 | parentFragmentManager.primaryNavigationFragment?.findNavController() | ||
| 120 | ?.navigate(R.id.action_homeSettingsFragment_to_earlyAccessFragment) | ||
| 121 | } | ||
| 122 | ) | ||
| 123 | } | ||
| 124 | |||
| 109 | binding.homeSettingsList.apply { | 125 | binding.homeSettingsList.apply { |
| 110 | layoutManager = LinearLayoutManager(requireContext()) | 126 | layoutManager = LinearLayoutManager(requireContext()) |
| 111 | adapter = HomeSettingAdapter(requireActivity() as AppCompatActivity, optionsList) | 127 | adapter = HomeSettingAdapter(requireActivity() as AppCompatActivity, optionsList) |
diff --git a/src/android/app/src/main/res/drawable/ic_check_circle.xml b/src/android/app/src/main/res/drawable/ic_check_circle.xml new file mode 100644 index 000000000..49e6ecd71 --- /dev/null +++ b/src/android/app/src/main/res/drawable/ic_check_circle.xml | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 2 | android:width="24dp" | ||
| 3 | android:height="24dp" | ||
| 4 | android:viewportWidth="24" | ||
| 5 | android:viewportHeight="24"> | ||
| 6 | <path | ||
| 7 | android:fillColor="?attr/colorControlNormal" | ||
| 8 | android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM10,17l-5,-5 1.41,-1.41L10,14.17l7.59,-7.59L19,8l-9,9z" /> | ||
| 9 | </vector> | ||
diff --git a/src/android/app/src/main/res/drawable/ic_diamond.xml b/src/android/app/src/main/res/drawable/ic_diamond.xml new file mode 100644 index 000000000..3896e12e4 --- /dev/null +++ b/src/android/app/src/main/res/drawable/ic_diamond.xml | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 2 | android:width="24dp" | ||
| 3 | android:height="24dp" | ||
| 4 | android:viewportWidth="24" | ||
| 5 | android:viewportHeight="24"> | ||
| 6 | <path | ||
| 7 | android:fillColor="?attr/colorControlNormal" | ||
| 8 | android:pathData="M19,3H5L2,9l10,12L22,9L19,3zM9.62,8l1.5,-3h1.76l1.5,3H9.62zM11,10v6.68L5.44,10H11zM13,10h5.56L13,16.68V10zM19.26,8h-2.65l-1.5,-3h2.65L19.26,8zM6.24,5h2.65l-1.5,3H4.74L6.24,5z" /> | ||
| 9 | </vector> | ||
diff --git a/src/android/app/src/main/res/drawable/premium_background.xml b/src/android/app/src/main/res/drawable/premium_background.xml new file mode 100644 index 000000000..c9c41ddbe --- /dev/null +++ b/src/android/app/src/main/res/drawable/premium_background.xml | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <shape xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| 3 | <gradient | ||
| 4 | android:type="linear" | ||
| 5 | android:angle="45" | ||
| 6 | android:startColor="@color/yuzu_ea_background_start" | ||
| 7 | android:endColor="@color/yuzu_ea_background_end" /> | ||
| 8 | <corners android:radius="12dp" /> | ||
| 9 | </shape> | ||
diff --git a/src/android/app/src/main/res/layout/card_home_option.xml b/src/android/app/src/main/res/layout/card_home_option.xml index aa535943f..dc289db17 100644 --- a/src/android/app/src/main/res/layout/card_home_option.xml +++ b/src/android/app/src/main/res/layout/card_home_option.xml | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | android:focusable="true"> | 14 | android:focusable="true"> |
| 15 | 15 | ||
| 16 | <LinearLayout | 16 | <LinearLayout |
| 17 | android:id="@+id/option_layout" | ||
| 17 | android:layout_width="match_parent" | 18 | android:layout_width="match_parent" |
| 18 | android:layout_height="wrap_content"> | 19 | android:layout_height="wrap_content"> |
| 19 | 20 | ||
diff --git a/src/android/app/src/main/res/layout/fragment_early_access.xml b/src/android/app/src/main/res/layout/fragment_early_access.xml new file mode 100644 index 000000000..644b4dd45 --- /dev/null +++ b/src/android/app/src/main/res/layout/fragment_early_access.xml | |||
| @@ -0,0 +1,242 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <androidx.coordinatorlayout.widget.CoordinatorLayout | ||
| 3 | xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 4 | xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| 5 | android:id="@+id/coordinator_about" | ||
| 6 | android:layout_width="match_parent" | ||
| 7 | android:layout_height="match_parent" | ||
| 8 | android:background="?attr/colorSurface"> | ||
| 9 | |||
| 10 | <com.google.android.material.appbar.AppBarLayout | ||
| 11 | android:id="@+id/appbar_ea" | ||
| 12 | android:layout_width="match_parent" | ||
| 13 | android:layout_height="wrap_content" | ||
| 14 | android:fitsSystemWindows="true"> | ||
| 15 | |||
| 16 | <com.google.android.material.appbar.MaterialToolbar | ||
| 17 | android:id="@+id/toolbar_about" | ||
| 18 | android:layout_width="match_parent" | ||
| 19 | android:layout_height="?attr/actionBarSize" | ||
| 20 | app:navigationIcon="@drawable/ic_back" | ||
| 21 | app:title="@string/early_access" /> | ||
| 22 | |||
| 23 | </com.google.android.material.appbar.AppBarLayout> | ||
| 24 | |||
| 25 | <androidx.core.widget.NestedScrollView | ||
| 26 | android:id="@+id/scroll_ea" | ||
| 27 | android:layout_width="match_parent" | ||
| 28 | android:layout_height="match_parent" | ||
| 29 | android:clipToPadding="false" | ||
| 30 | android:paddingBottom="20dp" | ||
| 31 | android:scrollbars="vertical" | ||
| 32 | android:fadeScrollbars="false" | ||
| 33 | app:layout_behavior="@string/appbar_scrolling_view_behavior"> | ||
| 34 | |||
| 35 | <LinearLayout | ||
| 36 | android:id="@+id/card_ea" | ||
| 37 | android:layout_width="match_parent" | ||
| 38 | android:layout_height="match_parent" | ||
| 39 | android:layout_marginVertical="32dp" | ||
| 40 | android:layout_marginHorizontal="20dp" | ||
| 41 | android:background="@drawable/premium_background" | ||
| 42 | android:orientation="vertical"> | ||
| 43 | |||
| 44 | <com.google.android.material.textview.MaterialTextView | ||
| 45 | style="@style/TextAppearance.Material3.TitleLarge" | ||
| 46 | android:layout_width="match_parent" | ||
| 47 | android:layout_height="wrap_content" | ||
| 48 | android:layout_marginTop="16dp" | ||
| 49 | android:layout_marginHorizontal="20dp" | ||
| 50 | android:text="@string/early_access_benefits" | ||
| 51 | android:textAlignment="center" | ||
| 52 | android:textStyle="bold" /> | ||
| 53 | |||
| 54 | <LinearLayout | ||
| 55 | android:layout_width="match_parent" | ||
| 56 | android:layout_height="wrap_content" | ||
| 57 | android:layout_marginTop="32dp" | ||
| 58 | android:layout_marginHorizontal="20dp" | ||
| 59 | android:orientation="horizontal"> | ||
| 60 | |||
| 61 | <ImageView | ||
| 62 | android:layout_width="24dp" | ||
| 63 | android:layout_height="24dp" | ||
| 64 | android:layout_gravity="center_vertical" | ||
| 65 | android:src="@drawable/ic_check_circle" | ||
| 66 | app:tint="?attr/colorOnSurface" /> | ||
| 67 | |||
| 68 | <com.google.android.material.textview.MaterialTextView | ||
| 69 | style="@style/TextAppearance.Material3.BodyLarge" | ||
| 70 | android:layout_width="match_parent" | ||
| 71 | android:layout_height="wrap_content" | ||
| 72 | android:layout_marginStart="20dp" | ||
| 73 | android:text="@string/cutting_edge_features" | ||
| 74 | android:textAlignment="viewStart" | ||
| 75 | android:layout_gravity="start|center_vertical" /> | ||
| 76 | |||
| 77 | </LinearLayout> | ||
| 78 | |||
| 79 | <LinearLayout | ||
| 80 | android:layout_width="match_parent" | ||
| 81 | android:layout_height="wrap_content" | ||
| 82 | android:layout_marginTop="32dp" | ||
| 83 | android:layout_marginHorizontal="20dp" | ||
| 84 | android:orientation="horizontal"> | ||
| 85 | |||
| 86 | <ImageView | ||
| 87 | android:layout_width="24dp" | ||
| 88 | android:layout_height="24dp" | ||
| 89 | android:layout_gravity="center_vertical" | ||
| 90 | android:src="@drawable/ic_check_circle" | ||
| 91 | app:tint="?attr/colorOnSurface" /> | ||
| 92 | |||
| 93 | <com.google.android.material.textview.MaterialTextView | ||
| 94 | style="@style/TextAppearance.Material3.BodyLarge" | ||
| 95 | android:layout_width="match_parent" | ||
| 96 | android:layout_height="wrap_content" | ||
| 97 | android:layout_marginStart="20dp" | ||
| 98 | android:text="@string/early_access_updates" | ||
| 99 | android:textAlignment="viewStart" | ||
| 100 | android:layout_gravity="start|center_vertical" /> | ||
| 101 | |||
| 102 | </LinearLayout> | ||
| 103 | |||
| 104 | <LinearLayout | ||
| 105 | android:layout_width="match_parent" | ||
| 106 | android:layout_height="wrap_content" | ||
| 107 | android:layout_marginTop="32dp" | ||
| 108 | android:layout_marginHorizontal="20dp" | ||
| 109 | android:orientation="horizontal"> | ||
| 110 | |||
| 111 | <ImageView | ||
| 112 | android:layout_width="24dp" | ||
| 113 | android:layout_height="24dp" | ||
| 114 | android:layout_gravity="center_vertical" | ||
| 115 | android:src="@drawable/ic_check_circle" | ||
| 116 | app:tint="?attr/colorOnSurface" /> | ||
| 117 | |||
| 118 | <com.google.android.material.textview.MaterialTextView | ||
| 119 | style="@style/TextAppearance.Material3.BodyLarge" | ||
| 120 | android:layout_width="match_parent" | ||
| 121 | android:layout_height="wrap_content" | ||
| 122 | android:layout_marginStart="20dp" | ||
| 123 | android:text="@string/no_manual_installation" | ||
| 124 | android:textAlignment="viewStart" | ||
| 125 | android:layout_gravity="start|center_vertical" /> | ||
| 126 | |||
| 127 | </LinearLayout> | ||
| 128 | |||
| 129 | <LinearLayout | ||
| 130 | android:layout_width="match_parent" | ||
| 131 | android:layout_height="wrap_content" | ||
| 132 | android:layout_marginTop="32dp" | ||
| 133 | android:layout_marginHorizontal="20dp" | ||
| 134 | android:orientation="horizontal"> | ||
| 135 | |||
| 136 | <ImageView | ||
| 137 | android:layout_width="24dp" | ||
| 138 | android:layout_height="24dp" | ||
| 139 | android:layout_gravity="center_vertical" | ||
| 140 | android:src="@drawable/ic_check_circle" | ||
| 141 | app:tint="?attr/colorOnSurface" /> | ||
| 142 | |||
| 143 | <com.google.android.material.textview.MaterialTextView | ||
| 144 | style="@style/TextAppearance.Material3.BodyLarge" | ||
| 145 | android:layout_width="match_parent" | ||
| 146 | android:layout_height="wrap_content" | ||
| 147 | android:layout_marginStart="20dp" | ||
| 148 | android:text="@string/prioritized_support" | ||
| 149 | android:textAlignment="viewStart" | ||
| 150 | android:layout_gravity="start|center_vertical" /> | ||
| 151 | |||
| 152 | </LinearLayout> | ||
| 153 | |||
| 154 | <LinearLayout | ||
| 155 | android:layout_width="match_parent" | ||
| 156 | android:layout_height="wrap_content" | ||
| 157 | android:layout_marginTop="32dp" | ||
| 158 | android:layout_marginHorizontal="20dp" | ||
| 159 | android:orientation="horizontal"> | ||
| 160 | |||
| 161 | <ImageView | ||
| 162 | android:layout_width="24dp" | ||
| 163 | android:layout_height="24dp" | ||
| 164 | android:layout_gravity="center_vertical" | ||
| 165 | android:src="@drawable/ic_check_circle" | ||
| 166 | app:tint="?attr/colorOnSurface" /> | ||
| 167 | |||
| 168 | <com.google.android.material.textview.MaterialTextView | ||
| 169 | style="@style/TextAppearance.Material3.BodyLarge" | ||
| 170 | android:layout_width="match_parent" | ||
| 171 | android:layout_height="wrap_content" | ||
| 172 | android:layout_marginStart="20dp" | ||
| 173 | android:text="@string/helping_game_preservation" | ||
| 174 | android:textAlignment="viewStart" | ||
| 175 | android:layout_gravity="start|center_vertical" /> | ||
| 176 | |||
| 177 | </LinearLayout> | ||
| 178 | |||
| 179 | <LinearLayout | ||
| 180 | android:layout_width="match_parent" | ||
| 181 | android:layout_height="wrap_content" | ||
| 182 | android:layout_marginTop="32dp" | ||
| 183 | android:layout_marginHorizontal="20dp" | ||
| 184 | android:orientation="horizontal"> | ||
| 185 | |||
| 186 | <ImageView | ||
| 187 | android:layout_width="24dp" | ||
| 188 | android:layout_height="24dp" | ||
| 189 | android:layout_gravity="center_vertical" | ||
| 190 | android:src="@drawable/ic_check_circle" | ||
| 191 | app:tint="?attr/colorOnSurface" /> | ||
| 192 | |||
| 193 | <com.google.android.material.textview.MaterialTextView | ||
| 194 | style="@style/TextAppearance.Material3.BodyLarge" | ||
| 195 | android:layout_width="match_parent" | ||
| 196 | android:layout_height="wrap_content" | ||
| 197 | android:layout_marginStart="20dp" | ||
| 198 | android:text="@string/our_eternal_gratitude" | ||
| 199 | android:textAlignment="viewStart" | ||
| 200 | android:layout_gravity="start|center_vertical" /> | ||
| 201 | |||
| 202 | </LinearLayout> | ||
| 203 | |||
| 204 | <com.google.android.material.textview.MaterialTextView | ||
| 205 | style="@style/TextAppearance.Material3.TitleLarge" | ||
| 206 | android:layout_width="match_parent" | ||
| 207 | android:layout_height="wrap_content" | ||
| 208 | android:text="@string/are_you_interested" | ||
| 209 | android:layout_marginTop="80dp" | ||
| 210 | android:layout_marginHorizontal="20dp" | ||
| 211 | android:textStyle="bold" | ||
| 212 | android:textAlignment="center" /> | ||
| 213 | |||
| 214 | <com.google.android.material.card.MaterialCardView | ||
| 215 | style="?attr/materialCardViewFilledStyle" | ||
| 216 | android:id="@+id/get_early_access_button" | ||
| 217 | android:layout_width="match_parent" | ||
| 218 | android:layout_height="wrap_content" | ||
| 219 | android:layout_marginTop="16dp" | ||
| 220 | android:layout_marginHorizontal="20dp" | ||
| 221 | android:layout_marginBottom="28dp" | ||
| 222 | android:background="?attr/selectableItemBackground" | ||
| 223 | android:backgroundTint="@android:color/black"> | ||
| 224 | |||
| 225 | <com.google.android.material.textview.MaterialTextView | ||
| 226 | style="@style/TextAppearance.Material3.TitleLarge" | ||
| 227 | android:layout_width="match_parent" | ||
| 228 | android:layout_height="wrap_content" | ||
| 229 | android:text="@string/get_early_access" | ||
| 230 | android:layout_marginHorizontal="20dp" | ||
| 231 | android:layout_marginVertical="8dp" | ||
| 232 | android:textColor="@android:color/white" | ||
| 233 | android:textStyle="bold" | ||
| 234 | android:textAlignment="center" /> | ||
| 235 | |||
| 236 | </com.google.android.material.card.MaterialCardView> | ||
| 237 | |||
| 238 | </LinearLayout> | ||
| 239 | |||
| 240 | </androidx.core.widget.NestedScrollView> | ||
| 241 | |||
| 242 | </androidx.coordinatorlayout.widget.CoordinatorLayout> | ||
diff --git a/src/android/app/src/main/res/navigation/home_navigation.xml b/src/android/app/src/main/res/navigation/home_navigation.xml index f44eb3fed..2275ddc32 100644 --- a/src/android/app/src/main/res/navigation/home_navigation.xml +++ b/src/android/app/src/main/res/navigation/home_navigation.xml | |||
| @@ -16,6 +16,9 @@ | |||
| 16 | <action | 16 | <action |
| 17 | android:id="@+id/action_homeSettingsFragment_to_aboutFragment" | 17 | android:id="@+id/action_homeSettingsFragment_to_aboutFragment" |
| 18 | app:destination="@id/aboutFragment" /> | 18 | app:destination="@id/aboutFragment" /> |
| 19 | <action | ||
| 20 | android:id="@+id/action_homeSettingsFragment_to_earlyAccessFragment" | ||
| 21 | app:destination="@id/earlyAccessFragment" /> | ||
| 19 | </fragment> | 22 | </fragment> |
| 20 | 23 | ||
| 21 | <fragment | 24 | <fragment |
| @@ -39,4 +42,9 @@ | |||
| 39 | android:name="org.yuzu.yuzu_emu.fragments.AboutFragment" | 42 | android:name="org.yuzu.yuzu_emu.fragments.AboutFragment" |
| 40 | android:label="AboutFragment" /> | 43 | android:label="AboutFragment" /> |
| 41 | 44 | ||
| 45 | <fragment | ||
| 46 | android:id="@+id/earlyAccessFragment" | ||
| 47 | android:name="org.yuzu.yuzu_emu.fragments.EarlyAccessFragment" | ||
| 48 | android:label="EarlyAccessFragment" /> | ||
| 49 | |||
| 42 | </navigation> | 50 | </navigation> |
diff --git a/src/android/app/src/main/res/values-night/yuzu_colors.xml b/src/android/app/src/main/res/values-night/yuzu_colors.xml index 1e563a6f2..49d823324 100644 --- a/src/android/app/src/main/res/values-night/yuzu_colors.xml +++ b/src/android/app/src/main/res/values-night/yuzu_colors.xml | |||
| @@ -31,4 +31,7 @@ | |||
| 31 | <color name="yuzu_surfaceTint">#9DCAFF</color> | 31 | <color name="yuzu_surfaceTint">#9DCAFF</color> |
| 32 | <color name="yuzu_outlineVariant">#42474E</color> | 32 | <color name="yuzu_outlineVariant">#42474E</color> |
| 33 | 33 | ||
| 34 | <color name="yuzu_ea_background_start">#840099</color> | ||
| 35 | <color name="yuzu_ea_background_end">#005AE1</color> | ||
| 36 | |||
| 34 | </resources> | 37 | </resources> |
diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index 629b21e08..8ee067ffd 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml | |||
| @@ -85,6 +85,20 @@ | |||
| 85 | <string name="website_link">https://yuzu-emu.org/</string> | 85 | <string name="website_link">https://yuzu-emu.org/</string> |
| 86 | <string name="github_link">https://github.com/yuzu-emu</string> | 86 | <string name="github_link">https://github.com/yuzu-emu</string> |
| 87 | 87 | ||
| 88 | <!-- Early access upgrade strings --> | ||
| 89 | <string name="early_access">Early Access</string> | ||
| 90 | <string name="get_early_access">Get Early Access</string> | ||
| 91 | <string name="play_store_link">https://play.google.com/store/apps/details?id=org.yuzu.yuzu_emu.ea</string> | ||
| 92 | <string name="get_early_access_description">Cutting-edge features, early access to updates, and more</string> | ||
| 93 | <string name="early_access_benefits">Early Access Benefits</string> | ||
| 94 | <string name="cutting_edge_features">Cutting-edge features</string> | ||
| 95 | <string name="early_access_updates">Early access to updates</string> | ||
| 96 | <string name="no_manual_installation">No manual installation</string> | ||
| 97 | <string name="prioritized_support">Prioritized support</string> | ||
| 98 | <string name="helping_game_preservation">Helping game preservation</string> | ||
| 99 | <string name="our_eternal_gratitude">Our eternal gratitude</string> | ||
| 100 | <string name="are_you_interested">Are you interested?</string> | ||
| 101 | |||
| 88 | <!-- General settings strings --> | 102 | <!-- General settings strings --> |
| 89 | <string name="frame_limit_enable">Enable limit speed</string> | 103 | <string name="frame_limit_enable">Enable limit speed</string> |
| 90 | <string name="frame_limit_enable_description">When enabled, emulation speed will be limited to a specified percentage of normal speed.</string> | 104 | <string name="frame_limit_enable_description">When enabled, emulation speed will be limited to a specified percentage of normal speed.</string> |
diff --git a/src/android/app/src/main/res/values/yuzu_colors.xml b/src/android/app/src/main/res/values/yuzu_colors.xml index 921149d88..5b7d189dc 100644 --- a/src/android/app/src/main/res/values/yuzu_colors.xml +++ b/src/android/app/src/main/res/values/yuzu_colors.xml | |||
| @@ -31,4 +31,7 @@ | |||
| 31 | <color name="yuzu_surfaceTint">#B52612</color> | 31 | <color name="yuzu_surfaceTint">#B52612</color> |
| 32 | <color name="yuzu_outlineVariant">#D8C2BE</color> | 32 | <color name="yuzu_outlineVariant">#D8C2BE</color> |
| 33 | 33 | ||
| 34 | <color name="yuzu_ea_background_start">#99FFE1</color> | ||
| 35 | <color name="yuzu_ea_background_end">#76C5FF</color> | ||
| 36 | |||
| 34 | </resources> | 37 | </resources> |