mirror of
https://github.com/bitfireAT/davx5-ose
synced 2024-10-04 18:33:49 +00:00
Added M3 theme to intro pages (#756)
* Added M3 theme Signed-off-by: Arnau Mora <arnyminerz@proton.me> * Don't use M2 colors anymore --------- Signed-off-by: Arnau Mora <arnyminerz@proton.me> Co-authored-by: Sunik Kupfer <kupfer@bitfire.at> Co-authored-by: Ricki Hirner <hirner@bitfire.at>
This commit is contained in:
parent
6b863164a4
commit
b5334887e8
|
@ -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
|
||||
|
@ -49,7 +49,7 @@ class IntroActivity : AppIntro2() {
|
|||
})
|
||||
}
|
||||
|
||||
setBarColor(M2Colors.primaryDark.toArgb())
|
||||
setBarColor(M3ColorScheme.LightColors.primary.toArgb())
|
||||
isSkipButtonEnabled = false
|
||||
|
||||
onBackPressedDispatcher.addCallback(this) {
|
||||
|
@ -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()
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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),
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue