Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added M3 theme to intro pages #756

Merged
merged 5 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import androidx.fragment.app.Fragment
import androidx.fragment.app.activityViewModels
import androidx.lifecycle.ViewModel
import at.bitfire.davdroid.log.Logger
import at.bitfire.davdroid.ui.M2Colors
import at.bitfire.davdroid.ui.M2Theme
import at.bitfire.davdroid.ui.AppTheme
import at.bitfire.davdroid.ui.M3ColorScheme
import com.github.appintro.AppIntro2
import dagger.hilt.android.AndroidEntryPoint
import dagger.hilt.android.lifecycle.HiltViewModel
Expand All @@ -49,7 +49,7 @@ class IntroActivity : AppIntro2() {
})
}

setBarColor(M2Colors.primaryDark.toArgb())
setBarColor(M3ColorScheme.LightColors.primary.toArgb())
isSkipButtonEnabled = false

onBackPressedDispatcher.addCallback(this) {
Expand Down Expand Up @@ -88,7 +88,7 @@ class IntroActivity : AppIntro2() {
ComposeView(requireActivity()).apply {
setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed)
setContent {
M2Theme {
AppTheme {
Box(Modifier.padding(bottom = dimensionResource(com.github.appintro.R.dimen.appintro2_bottombar_height))) {
page.ComposePage()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

package at.bitfire.davdroid.ui.intro

import android.app.Application
import android.content.res.Configuration
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
Expand All @@ -31,7 +30,6 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import at.bitfire.davdroid.R
import at.bitfire.davdroid.ui.M2Colors.primaryDark

class WelcomePage: IntroPage {

Expand All @@ -55,7 +53,7 @@ class WelcomePage: IntroPage {
Column(
modifier = Modifier
.fillMaxSize()
.background(color = primaryDark),
.background(color = MaterialTheme.colorScheme.primary),
) {
Image(
painter = painterResource(R.drawable.ic_launcher_foreground),
Expand Down Expand Up @@ -108,7 +106,7 @@ class WelcomePage: IntroPage {
Row(
modifier = Modifier
.fillMaxSize()
.background(color = primaryDark)
.background(color = MaterialTheme.colorScheme.primary)
.padding(
bottom = dimensionResource(
com.github.appintro.R.dimen.appintro2_bottombar_height
Expand Down