mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-21 13:18:56 +07:00
small fixes (#7181)
* fixes * relaced translations with _ * better displayCutout
This commit is contained in:
@ -35,12 +35,15 @@ Sources for Info about current orientation in case need:
|
||||
if (activity.requestedOrientation != orientation) activity.requestedOrientation = orientation
|
||||
}
|
||||
|
||||
override fun hasDisplayCutout(): Boolean {
|
||||
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
override fun hasDisplayCutout() = when {
|
||||
Build.VERSION.SDK_INT >= Build.VERSION_CODES.R ->
|
||||
activity.display?.cutout != null
|
||||
Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q ->
|
||||
@Suppress("DEPRECATION")
|
||||
activity.windowManager.defaultDisplay.cutout != null
|
||||
} else {
|
||||
false
|
||||
}
|
||||
Build.VERSION.SDK_INT >= Build.VERSION_CODES.P ->
|
||||
activity.window.decorView.rootWindowInsets.displayCutout != null
|
||||
else -> false
|
||||
}
|
||||
|
||||
override fun toggleDisplayCutout(androidCutout: Boolean) {
|
||||
|
Reference in New Issue
Block a user