android: Move overlays to their own layout

This commit is contained in:
Abandoned Cart 2023-06-14 08:54:34 -04:00
parent e20c4fbbd4
commit 0e957c2e35
5 changed files with 117 additions and 108 deletions

View File

@ -53,7 +53,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<activity <activity
android:name="org.yuzu.yuzu_emu.activities.EmulationActivity" android:name="org.yuzu.yuzu_emu.activities.EmulationActivity"
android:theme="@style/Theme.Yuzu.Main" android:theme="@style/Theme.Yuzu.Main"
android:screenOrientation="userLandscape"
android:supportsPictureInPicture="true" android:supportsPictureInPicture="true"
android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|uiMode" android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|uiMode"
android:exported="true"> android:exported="true">

View File

@ -11,13 +11,11 @@ import android.content.Intent
import android.content.SharedPreferences import android.content.SharedPreferences
import android.content.pm.ActivityInfo import android.content.pm.ActivityInfo
import android.content.res.Configuration import android.content.res.Configuration
import android.content.res.Resources
import android.graphics.Color import android.graphics.Color
import android.os.Bundle import android.os.Bundle
import android.os.Handler import android.os.Handler
import android.os.Looper import android.os.Looper
import android.util.Rational import android.util.Rational
import android.util.TypedValue
import android.view.* import android.view.*
import android.widget.TextView import android.widget.TextView
import androidx.activity.OnBackPressedCallback import androidx.activity.OnBackPressedCallback
@ -29,11 +27,11 @@ import androidx.core.graphics.Insets
import androidx.core.view.ViewCompat import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat import androidx.core.view.WindowInsetsCompat
import androidx.core.view.isVisible import androidx.core.view.isVisible
import androidx.core.view.updatePadding
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import androidx.lifecycle.Lifecycle import androidx.lifecycle.Lifecycle
import androidx.lifecycle.lifecycleScope import androidx.lifecycle.lifecycleScope
import androidx.lifecycle.repeatOnLifecycle import androidx.lifecycle.repeatOnLifecycle
import androidx.navigation.fragment.navArgs
import androidx.preference.PreferenceManager import androidx.preference.PreferenceManager
import androidx.window.layout.FoldingFeature import androidx.window.layout.FoldingFeature
import androidx.window.layout.WindowInfoTracker import androidx.window.layout.WindowInfoTracker
@ -328,10 +326,13 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
if (it.isSeparating) { if (it.isSeparating) {
emulationActivity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED emulationActivity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
if (it.orientation == FoldingFeature.Orientation.HORIZONTAL) { if (it.orientation == FoldingFeature.Orientation.HORIZONTAL) {
// Restrict emulation and overlays to the top of the screen
binding.emulationContainer.layoutParams.height = it.bounds.top binding.emulationContainer.layoutParams.height = it.bounds.top
// Prevent touch regions from being displayed in the hinge binding.overlayContainer.layoutParams.height = it.bounds.top
binding.overlayContainer.layoutParams.height = it.bounds.bottom // Restrict input and menu drawer to the bottom of the screen
binding.inputContainer.layoutParams.height = it.bounds.bottom
binding.inGameMenu.layoutParams.height = it.bounds.bottom binding.inGameMenu.layoutParams.height = it.bounds.bottom
isInFoldableLayout = true isInFoldableLayout = true
binding.surfaceInputOverlay.orientation = InputOverlay.FOLDABLE binding.surfaceInputOverlay.orientation = InputOverlay.FOLDABLE
refreshInputOverlay() refreshInputOverlay()
@ -341,12 +342,14 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
} ?: false } ?: false
if (!isFolding) { if (!isFolding) {
binding.emulationContainer.layoutParams.height = ViewGroup.LayoutParams.MATCH_PARENT binding.emulationContainer.layoutParams.height = ViewGroup.LayoutParams.MATCH_PARENT
binding.inputContainer.layoutParams.height = ViewGroup.LayoutParams.MATCH_PARENT
binding.overlayContainer.layoutParams.height = ViewGroup.LayoutParams.MATCH_PARENT binding.overlayContainer.layoutParams.height = ViewGroup.LayoutParams.MATCH_PARENT
binding.inGameMenu.layoutParams.height = ViewGroup.LayoutParams.MATCH_PARENT binding.inGameMenu.layoutParams.height = ViewGroup.LayoutParams.MATCH_PARENT
isInFoldableLayout = false isInFoldableLayout = false
updateScreenLayout() updateScreenLayout()
} }
binding.emulationContainer.requestLayout() binding.emulationContainer.requestLayout()
binding.inputContainer.requestLayout()
binding.overlayContainer.requestLayout() binding.overlayContainer.requestLayout()
binding.inGameMenu.requestLayout() binding.inGameMenu.requestLayout()
} }

View File

@ -668,136 +668,136 @@ class InputOverlay(context: Context, attrs: AttributeSet?) : SurfaceView(context
R.integer.SWITCH_STICK_L_Y_FOLDABLE R.integer.SWITCH_STICK_L_Y_FOLDABLE
) )
private fun getResourceValue(descriptor: String, position: Int) : Float { private fun getResourceValue(orientation: String, position: Int) : Float {
return when (descriptor) { return when (orientation) {
PORTRAIT -> resources.getInteger(portraitResources[position]).toFloat() / 1000 PORTRAIT -> resources.getInteger(portraitResources[position]).toFloat() / 1000
FOLDABLE -> resources.getInteger(foldableResources[position]).toFloat() / 1000 FOLDABLE -> resources.getInteger(foldableResources[position]).toFloat() / 1000
else -> resources.getInteger(landscapeResources[position]).toFloat() / 1000 else -> resources.getInteger(landscapeResources[position]).toFloat() / 1000
} }
} }
private fun defaultOverlayByLayout(descriptor: String) { private fun defaultOverlayByLayout(orientation: String) {
// Each value represents the position of the button in relation to the screen size without insets. // Each value represents the position of the button in relation to the screen size without insets.
preferences.edit() preferences.edit()
.putFloat( .putFloat(
ButtonType.BUTTON_A.toString() + "$descriptor-X", ButtonType.BUTTON_A.toString() + "-X$orientation",
getResourceValue(descriptor, 0) getResourceValue(orientation, 0)
) )
.putFloat( .putFloat(
ButtonType.BUTTON_A.toString() + "$descriptor-Y", ButtonType.BUTTON_A.toString() + "-Y$orientation",
getResourceValue(descriptor, 1) getResourceValue(orientation, 1)
) )
.putFloat( .putFloat(
ButtonType.BUTTON_B.toString() + "$descriptor-X", ButtonType.BUTTON_B.toString() + "-X$orientation",
getResourceValue(descriptor, 2) getResourceValue(orientation, 2)
) )
.putFloat( .putFloat(
ButtonType.BUTTON_B.toString() + "$descriptor-Y", ButtonType.BUTTON_B.toString() + "-Y$orientation",
getResourceValue(descriptor, 3) getResourceValue(orientation, 3)
) )
.putFloat( .putFloat(
ButtonType.BUTTON_X.toString() + "$descriptor-X", ButtonType.BUTTON_X.toString() + "-X$orientation",
getResourceValue(descriptor, 4) getResourceValue(orientation, 4)
) )
.putFloat( .putFloat(
ButtonType.BUTTON_X.toString() + "$descriptor-Y", ButtonType.BUTTON_X.toString() + "-Y$orientation",
getResourceValue(descriptor, 5) getResourceValue(orientation, 5)
) )
.putFloat( .putFloat(
ButtonType.BUTTON_Y.toString() + "$descriptor-X", ButtonType.BUTTON_Y.toString() + "-X$orientation",
getResourceValue(descriptor, 6) getResourceValue(orientation, 6)
) )
.putFloat( .putFloat(
ButtonType.BUTTON_Y.toString() + "$descriptor-Y", ButtonType.BUTTON_Y.toString() + "-Y$orientation",
getResourceValue(descriptor, 7) getResourceValue(orientation, 7)
) )
.putFloat( .putFloat(
ButtonType.TRIGGER_ZL.toString() + "$descriptor-X", ButtonType.TRIGGER_ZL.toString() + "-X$orientation",
getResourceValue(descriptor, 8) getResourceValue(orientation, 8)
) )
.putFloat( .putFloat(
ButtonType.TRIGGER_ZL.toString() + "$descriptor-Y", ButtonType.TRIGGER_ZL.toString() + "-Y$orientation",
getResourceValue(descriptor, 9) getResourceValue(orientation, 9)
) )
.putFloat( .putFloat(
ButtonType.TRIGGER_ZR.toString() + "$descriptor-X", ButtonType.TRIGGER_ZR.toString() + "-X$orientation",
getResourceValue(descriptor, 10) getResourceValue(orientation, 10)
) )
.putFloat( .putFloat(
ButtonType.TRIGGER_ZR.toString() + "$descriptor-Y", ButtonType.TRIGGER_ZR.toString() + "-Y$orientation",
getResourceValue(descriptor, 11) getResourceValue(orientation, 11)
) )
.putFloat( .putFloat(
ButtonType.DPAD_UP.toString() + "$descriptor-X", ButtonType.DPAD_UP.toString() + "-X$orientation",
getResourceValue(descriptor, 12) getResourceValue(orientation, 12)
) )
.putFloat( .putFloat(
ButtonType.DPAD_UP.toString() + "$descriptor-Y", ButtonType.DPAD_UP.toString() + "-Y$orientation",
getResourceValue(descriptor, 13) getResourceValue(orientation, 13)
) )
.putFloat( .putFloat(
ButtonType.TRIGGER_L.toString() + "$descriptor-X", ButtonType.TRIGGER_L.toString() + "-X$orientation",
getResourceValue(descriptor, 14) getResourceValue(orientation, 14)
) )
.putFloat( .putFloat(
ButtonType.TRIGGER_L.toString() + "$descriptor-Y", ButtonType.TRIGGER_L.toString() + "-Y$orientation",
getResourceValue(descriptor, 15) getResourceValue(orientation, 15)
) )
.putFloat( .putFloat(
ButtonType.TRIGGER_R.toString() + "$descriptor-X", ButtonType.TRIGGER_R.toString() + "-X$orientation",
getResourceValue(descriptor, 16) getResourceValue(orientation, 16)
) )
.putFloat( .putFloat(
ButtonType.TRIGGER_R.toString() + "$descriptor-Y", ButtonType.TRIGGER_R.toString() + "-Y$orientation",
getResourceValue(descriptor, 17) getResourceValue(orientation, 17)
) )
.putFloat( .putFloat(
ButtonType.BUTTON_PLUS.toString() + "$descriptor-X", ButtonType.BUTTON_PLUS.toString() + "-X$orientation",
getResourceValue(descriptor, 18) getResourceValue(orientation, 18)
) )
.putFloat( .putFloat(
ButtonType.BUTTON_PLUS.toString() + "$descriptor-Y", ButtonType.BUTTON_PLUS.toString() + "-Y$orientation",
getResourceValue(descriptor, 19) getResourceValue(orientation, 19)
) )
.putFloat( .putFloat(
ButtonType.BUTTON_MINUS.toString() + "$descriptor-X", ButtonType.BUTTON_MINUS.toString() + "-X$orientation",
getResourceValue(descriptor, 20) getResourceValue(orientation, 20)
) )
.putFloat( .putFloat(
ButtonType.BUTTON_MINUS.toString() + "$descriptor-Y", ButtonType.BUTTON_MINUS.toString() + "-Y$orientation",
getResourceValue(descriptor, 21) getResourceValue(orientation, 21)
) )
.putFloat( .putFloat(
ButtonType.BUTTON_HOME.toString() + "$descriptor-X", ButtonType.BUTTON_HOME.toString() + "-X$orientation",
getResourceValue(descriptor, 22) getResourceValue(orientation, 22)
) )
.putFloat( .putFloat(
ButtonType.BUTTON_HOME.toString() + "$descriptor-Y", ButtonType.BUTTON_HOME.toString() + "-Y$orientation",
getResourceValue(descriptor, 23) getResourceValue(orientation, 23)
) )
.putFloat( .putFloat(
ButtonType.BUTTON_CAPTURE.toString() + "$descriptor-X", ButtonType.BUTTON_CAPTURE.toString() + "-X$orientation",
getResourceValue(descriptor, 24) getResourceValue(orientation, 24)
) )
.putFloat( .putFloat(
ButtonType.BUTTON_CAPTURE.toString() + "$descriptor-Y", ButtonType.BUTTON_CAPTURE.toString() + "-Y$orientation",
getResourceValue(descriptor, 25) getResourceValue(orientation, 25)
) )
.putFloat( .putFloat(
ButtonType.STICK_R.toString() + "$descriptor-X", ButtonType.STICK_R.toString() + "-X$orientation",
getResourceValue(descriptor, 26) getResourceValue(orientation, 26)
) )
.putFloat( .putFloat(
ButtonType.STICK_R.toString() + "$descriptor-Y", ButtonType.STICK_R.toString() + "-Y$orientation",
getResourceValue(descriptor, 27) getResourceValue(orientation, 27)
) )
.putFloat( .putFloat(
ButtonType.STICK_L.toString() + "$descriptor-X", ButtonType.STICK_L.toString() + "-X$orientation",
getResourceValue(descriptor, 28) getResourceValue(orientation, 28)
) )
.putFloat( .putFloat(
ButtonType.STICK_L.toString() + "$descriptor-Y", ButtonType.STICK_L.toString() + "-Y$orientation",
getResourceValue(descriptor, 29) getResourceValue(orientation, 29)
) )
.apply() .apply()
} }

View File

@ -26,22 +26,10 @@
android:focusable="false" android:focusable="false"
android:focusableInTouchMode="false" /> android:focusableInTouchMode="false" />
<TextView
android:id="@+id/show_fps_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:clickable="false"
android:focusable="false"
android:shadowColor="@android:color/black"
android:textColor="@android:color/white"
android:textSize="12sp"
tools:ignore="RtlHardcoded" />
</FrameLayout> </FrameLayout>
<FrameLayout <FrameLayout
android:id="@+id/overlay_container" android:id="@+id/input_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="bottom"> android:layout_gravity="bottom">
@ -66,6 +54,25 @@
</FrameLayout> </FrameLayout>
<FrameLayout
android:id="@+id/overlay_container"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/show_fps_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:clickable="false"
android:focusable="false"
android:shadowColor="@android:color/black"
android:textColor="@android:color/white"
android:textSize="12sp"
tools:ignore="RtlHardcoded" />
</FrameLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
<com.google.android.material.navigation.NavigationView <com.google.android.material.navigation.NavigationView

View File

@ -36,25 +36,25 @@
<!-- Default SWITCH portrait layout --> <!-- Default SWITCH portrait layout -->
<integer name="SWITCH_BUTTON_A_X_PORTRAIT">840</integer> <integer name="SWITCH_BUTTON_A_X_PORTRAIT">840</integer>
<integer name="SWITCH_BUTTON_A_Y_PORTRAIT">820</integer> <integer name="SWITCH_BUTTON_A_Y_PORTRAIT">840</integer>
<integer name="SWITCH_BUTTON_B_X_PORTRAIT">740</integer> <integer name="SWITCH_BUTTON_B_X_PORTRAIT">740</integer>
<integer name="SWITCH_BUTTON_B_Y_PORTRAIT">860</integer> <integer name="SWITCH_BUTTON_B_Y_PORTRAIT">880</integer>
<integer name="SWITCH_BUTTON_X_X_PORTRAIT">740</integer> <integer name="SWITCH_BUTTON_X_X_PORTRAIT">740</integer>
<integer name="SWITCH_BUTTON_X_Y_PORTRAIT">780</integer> <integer name="SWITCH_BUTTON_X_Y_PORTRAIT">800</integer>
<integer name="SWITCH_BUTTON_Y_X_PORTRAIT">640</integer> <integer name="SWITCH_BUTTON_Y_X_PORTRAIT">640</integer>
<integer name="SWITCH_BUTTON_Y_Y_PORTRAIT">820</integer> <integer name="SWITCH_BUTTON_Y_Y_PORTRAIT">840</integer>
<integer name="SWITCH_STICK_L_X_PORTRAIT">180</integer> <integer name="SWITCH_STICK_L_X_PORTRAIT">180</integer>
<integer name="SWITCH_STICK_L_Y_PORTRAIT">640</integer> <integer name="SWITCH_STICK_L_Y_PORTRAIT">660</integer>
<integer name="SWITCH_STICK_R_X_PORTRAIT">820</integer> <integer name="SWITCH_STICK_R_X_PORTRAIT">820</integer>
<integer name="SWITCH_STICK_R_Y_PORTRAIT">640</integer> <integer name="SWITCH_STICK_R_Y_PORTRAIT">660</integer>
<integer name="SWITCH_TRIGGER_L_X_PORTRAIT">140</integer> <integer name="SWITCH_TRIGGER_L_X_PORTRAIT">140</integer>
<integer name="SWITCH_TRIGGER_L_Y_PORTRAIT">240</integer> <integer name="SWITCH_TRIGGER_L_Y_PORTRAIT">260</integer>
<integer name="SWITCH_TRIGGER_R_X_PORTRAIT">860</integer> <integer name="SWITCH_TRIGGER_R_X_PORTRAIT">860</integer>
<integer name="SWITCH_TRIGGER_R_Y_PORTRAIT">240</integer> <integer name="SWITCH_TRIGGER_R_Y_PORTRAIT">260</integer>
<integer name="SWITCH_TRIGGER_ZL_X_PORTRAIT">140</integer> <integer name="SWITCH_TRIGGER_ZL_X_PORTRAIT">140</integer>
<integer name="SWITCH_TRIGGER_ZL_Y_PORTRAIT">180</integer> <integer name="SWITCH_TRIGGER_ZL_Y_PORTRAIT">200</integer>
<integer name="SWITCH_TRIGGER_ZR_X_PORTRAIT">860</integer> <integer name="SWITCH_TRIGGER_ZR_X_PORTRAIT">860</integer>
<integer name="SWITCH_TRIGGER_ZR_Y_PORTRAIT">180</integer> <integer name="SWITCH_TRIGGER_ZR_Y_PORTRAIT">200</integer>
<integer name="SWITCH_BUTTON_MINUS_X_PORTRAIT">440</integer> <integer name="SWITCH_BUTTON_MINUS_X_PORTRAIT">440</integer>
<integer name="SWITCH_BUTTON_MINUS_Y_PORTRAIT">950</integer> <integer name="SWITCH_BUTTON_MINUS_Y_PORTRAIT">950</integer>
<integer name="SWITCH_BUTTON_PLUS_X_PORTRAIT">560</integer> <integer name="SWITCH_BUTTON_PLUS_X_PORTRAIT">560</integer>
@ -64,38 +64,38 @@
<integer name="SWITCH_BUTTON_CAPTURE_X_PORTRAIT">320</integer> <integer name="SWITCH_BUTTON_CAPTURE_X_PORTRAIT">320</integer>
<integer name="SWITCH_BUTTON_CAPTURE_Y_PORTRAIT">950</integer> <integer name="SWITCH_BUTTON_CAPTURE_Y_PORTRAIT">950</integer>
<integer name="SWITCH_BUTTON_DPAD_X_PORTRAIT">240</integer> <integer name="SWITCH_BUTTON_DPAD_X_PORTRAIT">240</integer>
<integer name="SWITCH_BUTTON_DPAD_Y_PORTRAIT">820</integer> <integer name="SWITCH_BUTTON_DPAD_Y_PORTRAIT">840</integer>
<!-- Default SWITCH foldable layout --> <!-- Default SWITCH foldable layout -->
<integer name="SWITCH_BUTTON_A_X_FOLDABLE">840</integer> <integer name="SWITCH_BUTTON_A_X_FOLDABLE">840</integer>
<integer name="SWITCH_BUTTON_A_Y_FOLDABLE">340</integer> <integer name="SWITCH_BUTTON_A_Y_FOLDABLE">390</integer>
<integer name="SWITCH_BUTTON_B_X_FOLDABLE">740</integer> <integer name="SWITCH_BUTTON_B_X_FOLDABLE">740</integer>
<integer name="SWITCH_BUTTON_B_Y_FOLDABLE">380</integer> <integer name="SWITCH_BUTTON_B_Y_FOLDABLE">430</integer>
<integer name="SWITCH_BUTTON_X_X_FOLDABLE">740</integer> <integer name="SWITCH_BUTTON_X_X_FOLDABLE">740</integer>
<integer name="SWITCH_BUTTON_X_Y_FOLDABLE">300</integer> <integer name="SWITCH_BUTTON_X_Y_FOLDABLE">350</integer>
<integer name="SWITCH_BUTTON_Y_X_FOLDABLE">640</integer> <integer name="SWITCH_BUTTON_Y_X_FOLDABLE">640</integer>
<integer name="SWITCH_BUTTON_Y_Y_FOLDABLE">340</integer> <integer name="SWITCH_BUTTON_Y_Y_FOLDABLE">390</integer>
<integer name="SWITCH_STICK_L_X_FOLDABLE">180</integer> <integer name="SWITCH_STICK_L_X_FOLDABLE">180</integer>
<integer name="SWITCH_STICK_L_Y_FOLDABLE">200</integer> <integer name="SWITCH_STICK_L_Y_FOLDABLE">250</integer>
<integer name="SWITCH_STICK_R_X_FOLDABLE">820</integer> <integer name="SWITCH_STICK_R_X_FOLDABLE">820</integer>
<integer name="SWITCH_STICK_R_Y_FOLDABLE">200</integer> <integer name="SWITCH_STICK_R_Y_FOLDABLE">250</integer>
<integer name="SWITCH_TRIGGER_L_X_FOLDABLE">140</integer> <integer name="SWITCH_TRIGGER_L_X_FOLDABLE">140</integer>
<integer name="SWITCH_TRIGGER_L_Y_FOLDABLE">80</integer> <integer name="SWITCH_TRIGGER_L_Y_FOLDABLE">130</integer>
<integer name="SWITCH_TRIGGER_R_X_FOLDABLE">860</integer> <integer name="SWITCH_TRIGGER_R_X_FOLDABLE">860</integer>
<integer name="SWITCH_TRIGGER_R_Y_FOLDABLE">80</integer> <integer name="SWITCH_TRIGGER_R_Y_FOLDABLE">130</integer>
<integer name="SWITCH_TRIGGER_ZL_X_FOLDABLE">140</integer> <integer name="SWITCH_TRIGGER_ZL_X_FOLDABLE">140</integer>
<integer name="SWITCH_TRIGGER_ZL_Y_FOLDABLE">20</integer> <integer name="SWITCH_TRIGGER_ZL_Y_FOLDABLE">70</integer>
<integer name="SWITCH_TRIGGER_ZR_X_FOLDABLE">860</integer> <integer name="SWITCH_TRIGGER_ZR_X_FOLDABLE">860</integer>
<integer name="SWITCH_TRIGGER_ZR_Y_FOLDABLE">20</integer> <integer name="SWITCH_TRIGGER_ZR_Y_FOLDABLE">70</integer>
<integer name="SWITCH_BUTTON_MINUS_X_FOLDABLE">440</integer> <integer name="SWITCH_BUTTON_MINUS_X_FOLDABLE">440</integer>
<integer name="SWITCH_BUTTON_MINUS_Y_FOLDABLE">420</integer> <integer name="SWITCH_BUTTON_MINUS_Y_FOLDABLE">470</integer>
<integer name="SWITCH_BUTTON_PLUS_X_FOLDABLE">560</integer> <integer name="SWITCH_BUTTON_PLUS_X_FOLDABLE">560</integer>
<integer name="SWITCH_BUTTON_PLUS_Y_FOLDABLE">420</integer> <integer name="SWITCH_BUTTON_PLUS_Y_FOLDABLE">470</integer>
<integer name="SWITCH_BUTTON_HOME_X_FOLDABLE">680</integer> <integer name="SWITCH_BUTTON_HOME_X_FOLDABLE">680</integer>
<integer name="SWITCH_BUTTON_HOME_Y_FOLDABLE">420</integer> <integer name="SWITCH_BUTTON_HOME_Y_FOLDABLE">470</integer>
<integer name="SWITCH_BUTTON_CAPTURE_X_FOLDABLE">320</integer> <integer name="SWITCH_BUTTON_CAPTURE_X_FOLDABLE">320</integer>
<integer name="SWITCH_BUTTON_CAPTURE_Y_FOLDABLE">420</integer> <integer name="SWITCH_BUTTON_CAPTURE_Y_FOLDABLE">470</integer>
<integer name="SWITCH_BUTTON_DPAD_X_FOLDABLE">240</integer> <integer name="SWITCH_BUTTON_DPAD_X_FOLDABLE">240</integer>
<integer name="SWITCH_BUTTON_DPAD_Y_FOLDABLE">340</integer> <integer name="SWITCH_BUTTON_DPAD_Y_FOLDABLE">390</integer>
</resources> </resources>