Jetpack Compose 容器在哪里?

4

我在一些教程中读到了有关容器的内容。

它的代码如下所示:

@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
) 

最近在探索Jetpack Compose 1.0.0-alpha07时发现它不见了,它不再受支持了吗?还是我错过了什么?

我已经包含了所有可能的库,但它并未显示。

    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'
1个回答

13

Container已被移除。您可以使用Box代替。

androidx.ui:ui - *:在0.1.0-dev11版本中已移除。

源代码


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接