Remove some other deprecation warnings
This commit is contained in:
parent
d36910ac19
commit
b9a7411cdb
@ -1,9 +1,10 @@
|
|||||||
package sushi.hardcore.droidfs.widgets
|
package sushi.hardcore.droidfs.widgets
|
||||||
|
|
||||||
import androidx.appcompat.app.AlertDialog
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.view.View
|
|
||||||
import android.view.WindowManager
|
import android.view.WindowManager
|
||||||
|
import androidx.appcompat.app.AlertDialog
|
||||||
|
import androidx.core.view.WindowInsetsCompat
|
||||||
|
import androidx.core.view.WindowInsetsControllerCompat
|
||||||
|
|
||||||
class ColoredAlertDialogBuilder: AlertDialog.Builder {
|
class ColoredAlertDialogBuilder: AlertDialog.Builder {
|
||||||
constructor(context: Context): super(context)
|
constructor(context: Context): super(context)
|
||||||
@ -29,8 +30,11 @@ class ColoredAlertDialogBuilder: AlertDialog.Builder {
|
|||||||
val dialog = create()
|
val dialog = create()
|
||||||
dialog.show()
|
dialog.show()
|
||||||
if (keepFullScreen){
|
if (keepFullScreen){
|
||||||
dialog.window?.decorView?.systemUiVisibility = View.SYSTEM_UI_FLAG_FULLSCREEN
|
dialog.window?.let {
|
||||||
dialog.window?.clearFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE)
|
WindowInsetsControllerCompat(it, it.decorView)
|
||||||
|
.hide(WindowInsetsCompat.Type.statusBars())
|
||||||
|
it.clearFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return dialog
|
return dialog
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user