-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
96a96e5
commit ace06fc
Showing
3 changed files
with
27 additions
and
5 deletions.
There are no files selected for viewing
24 changes: 23 additions & 1 deletion
24
src-tauri/gen/android/app/src/main/java/com/yadokani389/umegaemochi/MainActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,25 @@ | ||
package com.yadokani389.umegaemochi | ||
|
||
class MainActivity : TauriActivity() | ||
import android.os.Bundle | ||
import androidx.core.view.WindowCompat | ||
import androidx.core.view.WindowInsetsCompat | ||
import androidx.core.view.WindowInsetsControllerCompat | ||
|
||
class MainActivity : TauriActivity() { | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
|
||
// Allow content to extend under the system bars | ||
WindowCompat.setDecorFitsSystemWindows(window, false) | ||
|
||
// Get the insets controller to manage system UI | ||
val windowInsetsController = WindowCompat.getInsetsController(window, window.decorView) | ||
|
||
// Hide the status bar and navigation bar | ||
windowInsetsController.hide(WindowInsetsCompat.Type.systemBars()) | ||
|
||
// Show the system bars when swiping from the edge | ||
windowInsetsController.systemBarsBehavior = | ||
WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
src-tauri/gen/android/app/src/main/res/values-night/themes.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<resources xmlns:tools="http://schemas.android.com/tools"> | ||
<!-- Base application theme. --> | ||
<style name="Theme.umegaemochi" parent="Theme.MaterialComponents.DayNight.NoActionBar"> | ||
<!-- Customize your theme here. --> | ||
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item> | ||
</style> | ||
</resources> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<resources xmlns:tools="http://schemas.android.com/tools"> | ||
<!-- Base application theme. --> | ||
<style name="Theme.umegaemochi" parent="Theme.MaterialComponents.DayNight.NoActionBar"> | ||
<!-- Customize your theme here. --> | ||
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item> | ||
</style> | ||
</resources> | ||
</resources> |