@@ -11,14 +11,14 @@ import androidx.compose.animation.scaleOut
1111import androidx.compose.animation.slideInVertically
1212import androidx.compose.animation.slideOutVertically
1313import androidx.compose.animation.togetherWith
14- import androidx.compose.foundation.background
1514import androidx.compose.foundation.layout.Box
1615import androidx.compose.foundation.layout.Column
1716import androidx.compose.foundation.layout.Row
1817import androidx.compose.foundation.layout.Spacer
1918import androidx.compose.foundation.layout.fillMaxSize
2019import androidx.compose.foundation.layout.fillMaxWidth
2120import androidx.compose.foundation.layout.height
21+ import androidx.compose.foundation.layout.navigationBarsPadding
2222import androidx.compose.foundation.layout.padding
2323import androidx.compose.foundation.pager.HorizontalPager
2424import androidx.compose.foundation.pager.PagerState
@@ -39,8 +39,6 @@ import androidx.compose.runtime.rememberCoroutineScope
3939import androidx.compose.ui.Alignment
4040import androidx.compose.ui.Modifier
4141import androidx.compose.ui.draw.clip
42- import androidx.compose.ui.graphics.Brush
43- import androidx.compose.ui.graphics.Color
4442import androidx.compose.ui.text.font.FontWeight
4543import androidx.compose.ui.unit.dp
4644import kotlinx.coroutines.launch
@@ -78,15 +76,13 @@ fun AppIntro(
7876 val coroutineScope = rememberCoroutineScope()
7977 val colorScheme = MaterialTheme .colorScheme
8078
81- // Remember the current page backgroundColor for button tinting
8279 val currentPageColor by remember(pagerState.currentPage) {
8380 derivedStateOf {
8481 pages.getOrNull(pagerState.currentPage)?.backgroundColor
8582 ? : colorScheme.primary
8683 }
8784 }
8885
89- // Remember the current page text color for buttons
9086 val currentPageTextColor by remember(pagerState.currentPage) {
9187 derivedStateOf {
9288 pages.getOrNull(pagerState.currentPage)?.contentColor
@@ -97,16 +93,18 @@ fun AppIntro(
9793 Box (
9894 modifier = Modifier .fillMaxSize()
9995 ) {
100- // Content pager
10196 if (useAnimatedPager) {
10297 AnimatedIntroPager (
10398 pages = pages,
104- pagerState = pagerState
99+ pagerState = pagerState,
100+ modifier = Modifier
101+ .fillMaxSize()
105102 )
106103 } else {
107104 HorizontalPager (
108105 state = pagerState,
109- modifier = Modifier .fillMaxSize()
106+ modifier = Modifier
107+ .fillMaxSize()
110108 ) { page ->
111109 IntroPageContent (
112110 page = pages[page],
@@ -116,20 +114,10 @@ fun AppIntro(
116114 }
117115 }
118116
119- // Bottom navigation with gradient overlay
120117 Box (
121118 modifier = Modifier
122119 .align(Alignment .BottomCenter )
123120 .fillMaxWidth()
124- .background(
125- Brush .verticalGradient(
126- colors = listOf (
127- Color .Transparent ,
128- Color .Black .copy(alpha = 0.1f ),
129- Color .Black .copy(alpha = 0.2f )
130- )
131- )
132- )
133121 ) {
134122 Column (
135123 modifier = Modifier
@@ -149,7 +137,9 @@ fun AppIntro(
149137
150138 // Buttons
151139 Row (
152- modifier = Modifier .fillMaxWidth(),
140+ modifier = Modifier
141+ .fillMaxWidth()
142+ .navigationBarsPadding(),
153143 verticalAlignment = Alignment .CenterVertically
154144 ) {
155145 // Skip button with animation
0 commit comments