【问题标题】:Why Extended fab does not work? Any Ideas?为什么扩展工厂不起作用?有任何想法吗?
【发布时间】:2020-03-12 18:22:44
【问题描述】:

我正在尝试为我的活动运行扩展 FAB,请参阅下面的屏幕截图。它只是不想运行。在我的活动xml 我使用它如下:

<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        ads:layout_constraintBottom_toTopOf="@+id/create_ad_view"
        ads:layout_constraintEnd_toEndOf="parent"
        ads:layout_constraintStart_toStartOf="parent"
        ads:layout_constraintTop_toBottomOf="@+id/create_title_et"
        app:icon="@drawable/ic_check"
        style="@style/Widget.MaterialComponents.ExtendedFloatingActionButton.Icon"/>

顺便说一句,我使用了不同的资源和教程,甚至在 Material Design 的官方网站上也有一些使用 Extended FAB 的细节。这是我的dependency

implementation 'com.google.android.material:material:1.0.0'

【问题讨论】:

    标签: android material-design floating-action-button material-components material-components-android


    【解决方案1】:

    ExtendedFloatingActionButton1.1.0-alpha04 一起发布。

    使用

    implementation 'com.google.android.material:material:1.1.0'
    

    【讨论】:

    • 非常感谢。你的回答也是有效的。但是,我可以在 implementation 'com.google.android.material:material:1.2.0-alpha01' 的帮助下解决这个问题
    • @MarkDelphi 是的,1.1.0 和 1.2.0 都包含 ExtendedFab。 1.1.0 接近稳定版本,而 1.2.0 仍然是 alpha 版本,可能还没有准备好用于生产版本。
    猜你喜欢
    • 2012-03-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-07-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多