Skip to content

ClipToBounds clips shadow from elevation #12

Open
@jbarr21

Description

Is it necessary to clip this layout to its bounds? If so, can you at least allow this to be optionally overridden so that a toolbar content such as the one below can show its shadow over the bodyContent?

	CollapsingToolbarScaffold(
		modifier = Modifier.fillMaxSize(),
		state = rememberCollapsingToolbarScaffoldState(),
		scrollStrategy = ScrollStrategy.ExitUntilCollapsed,
		toolbarModifier = Modifier.fillMaxWidth(),
		toolbar = {
			TopAppBar(
				backgroundColor = MaterialTheme.colors.background,
				elevation = 16.dp,
				modifier = Modifier
					.fillMaxWidth()
					.height(104.dp) // shrinks to 56.dp
					.road(Alignment.BottomStart, Alignment.BottomStart)
					.background(Color.White),
			) { ... }
                        Box(modifier = Modifier.size(56.dp)) {
				if (showNavigation) {
					IconButton(onClick = { }, modifier = Modifier.align(Alignment.Center)) {
						Icon(Icons.Default.ArrowBack, contentDescription = null)
					}
				}
			}
               },
               body = { ... }
       )

Metadata

Assignees

No one assigned

    Labels

    apiImprovement of existing library contracts that may break backwards compatibility

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions