Skip to content

Commit

Permalink
ready for android release
Browse files Browse the repository at this point in the history
  • Loading branch information
Javier Manrique committed Nov 28, 2024
1 parent f69a7ff commit 689346f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion androidApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ android {
applicationId = "com.jmp.wayback"
minSdk = libs.versions.android.minSdk.get().toInt()
targetSdk = libs.versions.android.targetSdk.get().toInt()
versionCode = 4
versionCode = 5
versionName = "1.0.0"
}
packaging {
Expand Down
11 changes: 11 additions & 0 deletions androidApp/src/main/java/com/jmp/wayback/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.jmp.wayback

import android.os.Bundle
import android.view.View
import android.view.Window
import androidx.activity.ComponentActivity
import androidx.activity.SystemBarStyle
import androidx.activity.compose.setContent
Expand All @@ -23,6 +25,7 @@ class MainActivity : ComponentActivity() {
enableFullyEdgeToEdge()
super.onCreate(savedInstanceState)
WindowCompat.setDecorFitsSystemWindows(window, false)
configureNavigationBar(window)

initCameraProvider()
initLocationProvider()
Expand All @@ -40,6 +43,14 @@ class MainActivity : ComponentActivity() {
)
}

@Suppress("DEPRECATION")
private fun configureNavigationBar(window: Window) {
window.decorView.systemUiVisibility = (
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
or View.SYSTEM_UI_FLAG_LAYOUT_STABLE
)
}

private fun initCameraProvider() {
val cameraProvider: CameraProvider by inject(CameraProvider::class.java)
cameraProvider.init(
Expand Down
1 change: 0 additions & 1 deletion androidApp/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
</style>

<style name="AppTheme" parent="@android:style/Theme.Material.NoActionBar">
<item name="android:windowTranslucentNavigation">true</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
</style>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 689346f

Please sign in to comment.