Browse Source

fix Onboarding not working; fix deprecation in Activity.hideBars()

pull/54/head
Jannik 3 months ago
parent
commit
e76cbda04d
Signed by: Seil0
GPG Key ID: E8459F3723C52C24
  1. 5
      app/src/main/AndroidManifest.xml
  2. 7
      app/src/main/java/org/mosad/teapod/util/ActivityUtils.kt

5
app/src/main/AndroidManifest.xml

@ -11,11 +11,12 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.App.Starting">
android:theme="@style/AppTheme.Dark">
<activity
android:exported="true"
android:name="org.mosad.teapod.ui.activity.main.MainActivity"
android:screenOrientation="portrait">
android:screenOrientation="portrait"
android:theme="@style/Theme.App.Starting">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />

7
app/src/main/java/org/mosad/teapod/util/ActivityUtils.kt

@ -36,7 +36,12 @@ fun Activity.hideBars() {
setDecorFitsSystemWindows(false)
insetsController?.apply {
hide(WindowInsets.Type.statusBars() or WindowInsets.Type.navigationBars())
systemBarsBehavior = WindowInsetsController.BEHAVIOR_SHOW_BARS_BY_SWIPE
systemBarsBehavior = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
WindowInsetsController.BEHAVIOR_DEFAULT
} else {
@Suppress("deprecation")
WindowInsetsController.BEHAVIOR_SHOW_BARS_BY_SWIPE
}
}
} else {
@Suppress("deprecation")

Loading…
Cancel
Save

Du besuchst diese Seite mit einem veralteten IPv4-Internetzugang. Möglicherweise treten in Zukunft Probleme mit der Erreichbarkeit und Performance auf. Bitte frage deinen Internetanbieter oder Netzwerkadministrator nach IPv6-Unterstützung.
You are visiting this site with an outdated IPv4 internet access. You may experience problems with accessibility and performance in the future. Please ask your ISP or network administrator for IPv6 support.
Weitere Infos | More Information
Klicke zum schließen | Click to close