SDL and Android's DrawerLayout

Hi,

I’ve been working on an SDL Android app, and am trying to make use of Android’s DrawerLayout to add a slide-out options menu.

However, there seems to be an issue with the draw-order.

When initially doing the swipe-from-the-left to open the draw, there is no visible change. However, if I switch out of the app and then back into it, the draw now shows up and seems to work fine.

I’ve also tried enabling the ActionBar (removing NoActionBar from styles.xml). This allows the top part of the drawer to be seen before switching out of the app. When doing this, it appears that the menu is always there, but the SDL content is being rendered in front of it, instead of behind it.

Does anyone have an idea of what’s going wrong here?

Cheers,
Joppy

My layout is:

<?xml version="1.0" encoding="utf-8"?>

<!-- Drawer Layout -->
<androidx.drawerlayout.widget.DrawerLayout
    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:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:openDrawer="start">

    <!-- SDL Container -->
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/sdl_container"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
    </RelativeLayout>

    <!-- Left Drawer -->
    <com.google.android.material.navigation.NavigationView
        android:id="@+id/nav_view"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:fitsSystemWindows="true"
        app:headerLayout="@layout/snepulator_header"
        app:menu="@menu/activity_sdl_menu" />

</androidx.drawerlayout.widget.DrawerLayout>