Merge pull request #11410 from t895/fullscreen-fix
Android: Fix use of fullscreen modes on Cheats Activity
This commit is contained in:
commit
dcded04719
|
@ -30,14 +30,11 @@ public class InsetsHelper
|
|||
// Workaround for a bug on Android 13 that allows users to interact with UI behind the
|
||||
// navigation bar https://issuetracker.google.com/issues/248761842
|
||||
public static void applyNavbarWorkaround(int bottomInset, View workaroundView)
|
||||
{
|
||||
if (bottomInset > 0)
|
||||
{
|
||||
ViewGroup.LayoutParams lpWorkaround = workaroundView.getLayoutParams();
|
||||
lpWorkaround.height = bottomInset;
|
||||
workaroundView.setLayoutParams(lpWorkaround);
|
||||
}
|
||||
}
|
||||
|
||||
public static int getSystemGestureType(Context context)
|
||||
{
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
@ -45,20 +46,26 @@
|
|||
android:id="@+id/cheat_list"
|
||||
android:name="org.dolphinemu.dolphinemu.features.cheats.ui.CheatListFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="match_parent"
|
||||
tools:layout="@layout/fragment_cheat_list" />
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/cheat_details"
|
||||
android:name="org.dolphinemu.dolphinemu.features.cheats.ui.CheatDetailsFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="match_parent"
|
||||
tools:layout="@layout/fragment_cheat_details" />
|
||||
|
||||
</androidx.slidingpanelayout.widget.SlidingPaneLayout>
|
||||
|
||||
<!-- We have to set the layout height at 1px because when a device forces fullscreen mode,
|
||||
inset callbacks are not triggered and using 0dp will make this view cover the entire
|
||||
display since this activity uses a constraint layout. Now, even if the callback isn't
|
||||
triggered, this view will remain at 1px height. -->
|
||||
<View
|
||||
android:id="@+id/workaround_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_height="1px"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@android:color/transparent"
|
||||
android:clickable="true"
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
@ -14,7 +15,8 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/gfx_mods_warning" />
|
||||
app:layout_constraintBottom_toTopOf="@id/gfx_mods_warning"
|
||||
tools:layout="@layout/fragment_cheat_warning" />
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/gfx_mods_warning"
|
||||
|
@ -25,7 +27,8 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/cheats_warning"
|
||||
app:layout_constraintBottom_toTopOf="@id/cheat_list" />
|
||||
app:layout_constraintBottom_toTopOf="@id/cheat_list"
|
||||
tools:layout="@layout/fragment_cheat_warning" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/cheat_list"
|
||||
|
|
Loading…
Reference in New Issue