Skip to content

Commit

Permalink
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 42 deletions.
3 changes: 2 additions & 1 deletion Owl/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@

<activity
android:name=".ui.MainActivity"
android:exported="true">
android:exported="true"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
Expand Down
13 changes: 9 additions & 4 deletions Owl/app/src/main/java/com/example/owl/ui/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,22 @@ package com.example.owl.ui

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.SystemBarStyle
import androidx.activity.compose.setContent
import androidx.core.view.WindowCompat
import androidx.activity.enableEdgeToEdge
import androidx.core.content.ContextCompat
import com.example.owl.R

class MainActivity : ComponentActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
enableEdgeToEdge(
statusBarStyle = SystemBarStyle.dark(
ContextCompat.getColor(this, R.color.immersive_sys_ui)
)
)
super.onCreate(savedInstanceState)

// This app draws behind the system bars, so we want to handle fitting system windows
WindowCompat.setDecorFitsSystemWindows(window, false)

setContent {
OwlApp { finish() }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.aspectRatio
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.statusBarsPadding
Expand Down Expand Up @@ -87,7 +86,6 @@ fun Onboarding(onboardingComplete: () -> Unit) {
FloatingActionButton(
onClick = onboardingComplete,
modifier = Modifier
.navigationBarsPadding()
) {
Icon(
imageVector = Icons.Rounded.Explore,
Expand All @@ -97,10 +95,7 @@ fun Onboarding(onboardingComplete: () -> Unit) {
}
) { innerPadding ->
Column(
modifier = Modifier
.statusBarsPadding()
.navigationBarsPadding()
.padding(innerPadding)
modifier = Modifier.padding(innerPadding)
) {
Text(
text = stringResource(R.string.choose_topics_that_interest_you),
Expand Down
19 changes: 0 additions & 19 deletions Owl/app/src/main/res/values-v29/color.xml

This file was deleted.

3 changes: 0 additions & 3 deletions Owl/app/src/main/res/values/color.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,5 @@
the License.
-->
<resources>

<color name="immersive_sys_ui">#33000000</color>
<color name="nav_bar">@color/immersive_sys_ui</color>

</resources>
10 changes: 1 addition & 9 deletions Owl/app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@
the License.
-->
<resources>

<style name="Theme.Owl" parent="@style/Theme.Material.DayNight.NoActionBar">
<item name="android:colorPrimary">#ff00ff</item>
<item name="android:colorAccent">#ff00ff</item>
<item name="android:statusBarColor">@color/immersive_sys_ui</item>
<item name="android:navigationBarColor">@color/nav_bar</item>
</style>

<style name="Theme.Owl" parent="@style/Theme.Material.DayNight.NoActionBar"/>
<style name="Theme.Material.DayNight.NoActionBar" parent="@android:style/Theme.Material.Light.NoActionBar" />

</resources>

0 comments on commit 8579bd1

Please sign in to comment.