Good Morning "Composers" :wink: can anyone assist with my question currently open on SO? <https://st...
t
Good Morning "Composers" 😉 can anyone assist with my question currently open on SO? https://stackoverflow.com/questions/74372019/how-to-employ-backdropscaffoldstate-offset-correctly-to-offset-front-contentlaye
p
I somehow don't have access to BackdropScafold
but in your code in stackoverflow you are using
Copy code
Scaffold(
    topBar = { Spacer(modifier = Modifier.height(0.dp)) },
    modifier = Modifier.fillMaxSize(),
) { paddingValues ->
t
@Pedro Alberto thanks for taking the time to look at this yes, that
scaffold
is the content for my
frontLayerContent
of my
BackdropScaffold
as shown here..
Copy code
BackdropScaffold(
    scaffoldState = scaffoldState,
    gesturesEnabled = false,
    appBar = myAppBar,
    frontLayerBackgroundColor = MaterialTheme.colorScheme.surface,
    backLayerBackgroundColor = MaterialTheme.colorScheme.inverseOnSurface,
    backLayerContentColor = MaterialTheme.colorScheme.onSecondary,
    backLayerContent = {
        BackdropLayerContent(
            windowSize = windowSize,
            devicePosture = devicePosture,
            practiceUpdateNavigation = practiceUpdateNavigation
        )
    },
    frontLayerContent = { frontLayerContent() },
    frontLayerScrimColor = Color.Unspecified,
    peekHeight = peekHeight
) {
p
to control the sate i guess you need to use the scafold state but are you sharing the state btw both ?
t
i dont think that article is advanced enough for my issue
Copy code
var offset by (backdropState.offset as MutableState)
im sure the "proper" solution will involve the
backdropState.offset
, and i will include using the modifier
offset
Copy code
modifier = Modifier
            .fillMaxSize()
            .offset { IntOffset(x = 0, y = -offset.toInt()) },
p
did you try inverting the order ?
t
i think my only issue is calculating the amount (and type) of offest to employ
p
Copy code
Modifier
            .offset { IntOffset(x = 0, y = -offset.toInt()) }
             .fillMaxSize()
t
oh 😄
p
the calculation I would need to apply this and try to understand what you trying to achieve
t
the issue i have is that when the backdrop is open and i have many items in the frontcontent list i cannot scroll down far enough to make the last item in the list 100% visible
p
and is that related to the backdrop or to the LazyColumn you using ? did you try the same content on other scafold and see if you can see all the content ?
t
it is all related to the backdrop
my app has multiple screens that are hosted in the backdrops frontcontentlayer and all these "frontlayer" lists have exactly the same issue i cannot scroll down far enough to see the last item in each list
my solution is "close" however i have made an error in my code as the offset of my list is constant and doesnt react to me opening the backdrop