zhwguest
V2EX  ›  Android

composable 的 material3 到底是个什么状态了啊?

  •  
  •   zhwguest · May 26, 2023 · 12355 views
    This topic created in 1086 days ago, the information mentioned may be changed or developed.

    按说推出来也有个至少 2 、3 年了吧,怎么出现这么个情况,使用 Android Studio Flamingo 生成一个 Empty Compose Activity 。

    没问题,使用了 material3 ,默认依赖项目如下

        implementation 'androidx.core:core-ktx:1.8.0'
        implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
        implementation 'androidx.activity:activity-compose:1.5.1'
        implementation platform('androidx.compose:compose-bom:2022.10.00')
        implementation 'androidx.compose.ui:ui'
        implementation 'androidx.compose.ui:ui-graphics'
        implementation 'androidx.compose.ui:ui-tooling-preview'
        implementation 'androidx.compose.material3:material3'
    

    好吧,随便放一个OutlinedTextField,居然提示:

    This material API is experimental and is likely to change or to be removed in the future.
    

    提示我需要增加注解@OptIn(ExperimentalMaterial3Api::class)消除警告。增加当然很简单,点一下鼠标就来了。

    但是我想问的是,这是应该的么?大力推荐出来的material3,用一个最基本的组件,居然是体验性的?虽然我知道谷歌的尿性,但是这也太不可接受了吧。莫非我的版本使用有问题?

    3 replies    2023-05-26 15:51:12 +08:00
    shakukansp
        1
    shakukansp  
       May 26, 2023
    Scaffold 都是实验性的呢
    就这样,这种组件后期改动也不会特别大,最多改点属性改个名字,用着应该没事
    cest
        2
    cest  
       May 26, 2023   ❤️ 1
    推出几年还全是 bug, 最基本 ui 也不 work

    还以为说的是 winui3 呢
    x77
        3
    x77  
       May 26, 2023
    放心用,Google Flutter 框架支持 Material 3 ,很稳。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2874 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 12:26 · PVG 20:26 · LAX 05:26 · JFK 08:26
    ♥ Do have faith in what you're doing.