mirror of
https://github.com/cmclark00/mintris.git
synced 2025-05-18 02:35:21 +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 {
|
runOnUiThread {
|
||||||
if (binding.pauseContainer.visibility == View.VISIBLE) {
|
if (binding.pauseContainer.visibility == View.VISIBLE) {
|
||||||
moveMenuSelectionUp()
|
moveMenuSelectionUp()
|
||||||
|
// Ensure the selected item is visible
|
||||||
|
scrollToSelectedItem()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1232,6 +1234,8 @@ class MainActivity : AppCompatActivity(),
|
||||||
runOnUiThread {
|
runOnUiThread {
|
||||||
if (binding.pauseContainer.visibility == View.VISIBLE) {
|
if (binding.pauseContainer.visibility == View.VISIBLE) {
|
||||||
moveMenuSelectionDown()
|
moveMenuSelectionDown()
|
||||||
|
// Ensure the selected item is visible
|
||||||
|
scrollToSelectedItem()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -305,7 +305,6 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/black"
|
android:background="@color/black"
|
||||||
android:gravity="center"
|
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:visibility="gone">
|
android:visibility="gone">
|
||||||
|
|
||||||
|
@ -314,6 +313,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:layout_marginTop="32dp"
|
||||||
android:layout_marginBottom="32dp">
|
android:layout_marginBottom="32dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -336,17 +336,21 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
|
android:id="@+id/pauseMenuScrollView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:fillViewport="true">
|
android:scrollbars="none"
|
||||||
|
android:overScrollMode="never"
|
||||||
|
android:fillViewport="false">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:paddingTop="16dp">
|
android:paddingTop="16dp"
|
||||||
|
android:paddingBottom="32dp">
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/pauseStartButton"
|
android:id="@+id/pauseStartButton"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue