From c9d767dd8030719ff0c548435b2989373bcf6a2e Mon Sep 17 00:00:00 2001 From: Fynn Godau Date: Tue, 4 May 2021 19:23:46 +0200 Subject: [PATCH] Allow drawing RPIs fragment under system navbars --- .../core/ui/ExposureNotificationsRpisFragment.kt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/play-services-nearby-core-ui/src/main/kotlin/org/microg/gms/nearby/core/ui/ExposureNotificationsRpisFragment.kt b/play-services-nearby-core-ui/src/main/kotlin/org/microg/gms/nearby/core/ui/ExposureNotificationsRpisFragment.kt index 339bc88a..f6fc8d83 100644 --- a/play-services-nearby-core-ui/src/main/kotlin/org/microg/gms/nearby/core/ui/ExposureNotificationsRpisFragment.kt +++ b/play-services-nearby-core-ui/src/main/kotlin/org/microg/gms/nearby/core/ui/ExposureNotificationsRpisFragment.kt @@ -7,11 +7,14 @@ package org.microg.gms.nearby.core.ui import android.annotation.TargetApi import android.os.Bundle +import android.view.LayoutInflater +import android.view.ViewGroup import androidx.appcompat.app.AlertDialog import androidx.lifecycle.lifecycleScope import androidx.preference.Preference import androidx.preference.PreferenceCategory import androidx.preference.PreferenceFragmentCompat +import androidx.recyclerview.widget.RecyclerView import org.microg.gms.nearby.exposurenotification.ExposureDatabase @TargetApi(21) @@ -21,6 +24,18 @@ class ExposureNotificationsRpisFragment : PreferenceFragmentCompat() { private lateinit var deleteAll: Preference private lateinit var exportDb: Preference + override fun onCreateRecyclerView( + inflater: LayoutInflater?, + parent: ViewGroup?, + savedInstanceState: Bundle? + ): RecyclerView { + return super.onCreateRecyclerView(inflater, parent, savedInstanceState).apply { + // Allow drawing under system navbar / status bar + fitsSystemWindows = true + clipToPadding = false + } + } + override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { addPreferencesFromResource(R.xml.preferences_exposure_notifications_rpis) }