mirror of
https://github.com/cmclark00/mintris.git
synced 2025-05-18 00:25:20 +01:00
Fix pause menu scrolling and gamepad navigation: - Remove fillViewport from ScrollView to allow proper scrolling - Add explicit scrollToSelectedItem calls in menu navigation - Ensure selected item is always visible when navigating with gamepad
This commit is contained in:
parent
05a504bb21
commit
240f16be82
2 changed files with 11 additions and 3 deletions
|
@ -1224,6 +1224,8 @@ class MainActivity : AppCompatActivity(),
|
|||
runOnUiThread {
|
||||
if (binding.pauseContainer.visibility == View.VISIBLE) {
|
||||
moveMenuSelectionUp()
|
||||
// Ensure the selected item is visible
|
||||
scrollToSelectedItem()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1232,6 +1234,8 @@ class MainActivity : AppCompatActivity(),
|
|||
runOnUiThread {
|
||||
if (binding.pauseContainer.visibility == View.VISIBLE) {
|
||||
moveMenuSelectionDown()
|
||||
// Ensure the selected item is visible
|
||||
scrollToSelectedItem()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -305,7 +305,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/black"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
|
@ -314,6 +313,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="32dp"
|
||||
android:layout_marginBottom="32dp">
|
||||
|
||||
<TextView
|
||||
|
@ -336,17 +336,21 @@
|
|||
</LinearLayout>
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/pauseMenuScrollView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:fillViewport="true">
|
||||
android:scrollbars="none"
|
||||
android:overScrollMode="never"
|
||||
android:fillViewport="false">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:paddingTop="16dp">
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="32dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/pauseStartButton"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue