mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-14 09:48:12 +07:00
added cutout support (#7044)
* added support * now toggleable in settings * translation * added note that it requires restart * made it enabled by default * padded buttons to the right if there is a cutout * checking for cutout instead of android * reverted button changes * moved option to advancedTab
This commit is contained in:
@ -2,7 +2,9 @@ package com.unciv.app
|
||||
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.core.app.NotificationManagerCompat
|
||||
import androidx.work.WorkManager
|
||||
import com.badlogic.gdx.backends.android.AndroidApplication
|
||||
@ -33,10 +35,14 @@ open class AndroidLauncher : AndroidApplication() {
|
||||
val settings = GameSaver.getSettingsForPlatformLaunchers(filesDir.path)
|
||||
val fontFamily = settings.fontFamily
|
||||
|
||||
// Manage orientation lock
|
||||
// Manage orientation lock and display cutout
|
||||
val platformSpecificHelper = PlatformSpecificHelpersAndroid(this)
|
||||
platformSpecificHelper.allowPortrait(settings.allowAndroidPortrait)
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||
platformSpecificHelper.toggleDisplayCutout(settings.androidCutout)
|
||||
}
|
||||
|
||||
val androidParameters = UncivGameParameters(
|
||||
version = BuildConfig.VERSION_NAME,
|
||||
crashReportSysInfo = CrashReportSysInfoAndroid,
|
||||
|
Reference in New Issue
Block a user