I'm having a lot of trouble figuring out what `ali...
# compose
c
I'm having a lot of trouble figuring out what
align
function I need to import. It doesn't help that the import suggestions look like this:
Is there a way to ... fix this?
And which one am I supposed to choose?
I'd have thought
import androidx.compose.foundation.layout.BoxScopeInstance.align
but I get
Cannot access '@StabilityInferred(...) @SourceDebugExtension(...) object BoxScopeInstance : BoxScope': it is internal in file
j
Parent scope of your box composable should be BoxScope. Which means, if you do Box { //*your snippet/*/ }, everything should work. You need to use appropriate Alignment for your given parent scope (be it RowScope or ColumnScope).
c
As, I think I see my confusion. I've been thinking the
align()
modifier specified the alignment of the contents, not the alignment within the parent.
jetpack compose 1
Doesn't help me fix the UI dropdown, though. But that's a secondary issue.
j
maxLines = 1 xD
228 Views