Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is Jetpack Compose Container?

I read on the Container from some tutorial

  • https://joebirch.co/android/exploring-jetpack-compose-container/
  • https://levelup.gitconnected.com/jetpack-compose-container-layout-183e655518f2

It is coded as below

@Composable
fun Container(
    modifier: Modifier = Modifier.None,
    padding: EdgeInsets = EdgeInsets(0.dp),
    alignment: Alignment = Alignment.Center,
    expanded: Boolean = false,
    constraints: DpConstraints = DpConstraints(),
    width: Dp? = null,
    height: Dp? = null,
    children: @Composable() () -> Unit
) 

Recently while exploring on Jetpack Compose 1.0.0-alpha07, can no longer see it. Is it no longer supported or what did I miss?

I included all library I could, but it didn't show.

    implementation 'androidx.compose.ui:ui:1.0.0-alpha07'
    // Tooling support (Previews, etc.)
    implementation 'androidx.ui:ui-tooling:1.0.0-alpha07'
    // Foundation (Border, Background, Box, Image, Scroll, shapes, animations, etc.)
    implementation 'androidx.compose.foundation:foundation:1.0.0-alpha07'
    // Material Design
    implementation 'androidx.compose.material:material:1.0.0-alpha07'
    // Material design icons
    implementation 'androidx.compose.material:material-icons-core:1.0.0-alpha07'
    implementation 'androidx.compose.material:material-icons-extended:1.0.0-alpha07'
    // Integration with observables
    implementation 'androidx.compose.runtime:runtime-livedata:1.0.0-alpha07'
    implementation 'androidx.compose.runtime:runtime-rxjava2:1.0.0-alpha07'
like image 884
Elye Avatar asked Jan 24 '23 14:01

Elye


1 Answers

Hello Container has been removed. You can use Box instead.

androidx.ui: ui - *: Removed in 0.1.0-dev11 version.

Source

like image 50
snorlax Avatar answered Feb 04 '23 05:02

snorlax