【问题标题】:Where is Jetpack Compose Container?Jetpack Compose 容器在哪里?
【发布时间】:2020-11-19 09:12:51
【问题描述】:

我从一些教程中阅读了容器

编码如下

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

【问题讨论】:

    标签: android android-jetpack-compose


    【解决方案1】:

    Hello Container 已被移除。您可以改用 Box

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

    Source

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-02-15
      • 2022-11-30
      • 1970-01-01
      • 1970-01-01
      • 2023-01-22
      • 2022-01-09
      • 2021-08-27
      相关资源
      最近更新 更多