Skip to content

Commit

Permalink
Merge branch 'predictive-back-seekable' of https://github.com/android…
Browse files Browse the repository at this point in the history
…/snippets into predictive-back-seekable
  • Loading branch information
riggaroo committed Dec 10, 2024
2 parents f420997 + 2751e7b commit 3432b15
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ import androidx.navigation.navArgument
import com.example.compose.snippets.R
import com.example.compose.snippets.ui.theme.LavenderLight
import com.example.compose.snippets.ui.theme.RoseLight
import kotlinx.coroutines.launch
import kotlin.coroutines.cancellation.CancellationException
import kotlinx.coroutines.launch

@Preview
@Composable
Expand Down Expand Up @@ -272,10 +272,10 @@ private fun DetailsContent(
// [END android_compose_shared_element_text_bounds_transform]
Text(
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur sit amet lobortis velit. " +
"Lorem ipsum dolor sit amet, consectetur adipiscing elit." +
" Curabitur sagittis, lectus posuere imperdiet facilisis, nibh massa " +
"molestie est, quis dapibus orci ligula non magna. Pellentesque rhoncus " +
"hendrerit massa quis ultricies. Curabitur congue ullamcorper leo, at maximus",
"Lorem ipsum dolor sit amet, consectetur adipiscing elit." +
" Curabitur sagittis, lectus posuere imperdiet facilisis, nibh massa " +
"molestie est, quis dapibus orci ligula non magna. Pellentesque rhoncus " +
"hendrerit massa quis ultricies. Curabitur congue ullamcorper leo, at maximus",
modifier = Modifier.skipToLookaheadSize()
)
}
Expand Down Expand Up @@ -332,7 +332,7 @@ private fun SharedElement_Clipping() {
rememberSharedContentState(key = "title"),
animatedVisibilityScope = this@AnimatedContent,

)
)
)
}
} else {
Expand Down Expand Up @@ -370,10 +370,10 @@ private fun SharedElement_Clipping() {
)
Text(
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur sit amet lobortis velit. " +
"Lorem ipsum dolor sit amet, consectetur adipiscing elit." +
" Curabitur sagittis, lectus posuere imperdiet facilisis, nibh massa " +
"molestie est, quis dapibus orci ligula non magna. Pellentesque rhoncus " +
"hendrerit massa quis ultricies. Curabitur congue ullamcorper leo, at maximus"
"Lorem ipsum dolor sit amet, consectetur adipiscing elit." +
" Curabitur sagittis, lectus posuere imperdiet facilisis, nibh massa " +
"molestie est, quis dapibus orci ligula non magna. Pellentesque rhoncus " +
"hendrerit massa quis ultricies. Curabitur congue ullamcorper leo, at maximus"
)
}
}
Expand Down Expand Up @@ -685,7 +685,8 @@ fun CustomPredictiveBackHandle() {
seekableTransitionState.seekTo(it, Screen.Details(lastNavigatedIndex))
}
}
})
}
)
SharedTransitionLayout(modifier = Modifier.weight(1f)) {
transition.AnimatedContent { targetState ->
when (targetState) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ import androidx.compose.ui.res.painterResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.navigation.NavHostController
import androidx.navigation.NavType
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
Expand Down Expand Up @@ -77,7 +76,7 @@ fun SharedElement_PredictiveBack() {
HomeScreen(
this@SharedTransitionLayout,
this@composable,
{ navController.navigate("details/$it") }
{ navController.navigate("details/$it") }
)
}
composable(
Expand Down

0 comments on commit 3432b15

Please sign in to comment.