nambicompany / expandable-fab

A highly customizable 'speed dial' FloatingActionButton implementation.
https://nambicompany.github.io/expandable-fab/
MIT License
199 stars 20 forks source link

FabOption background onPressed color look weird in android 12. #45

Closed frankmungnodev closed 1 year ago

frankmungnodev commented 2 years ago

I wrote a simple demo using this library.

`<androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity">

    <com.lailen.pixart.drawer.widget.PixArtView
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <com.nambimobile.widgets.efab.ExpandableFabLayout
        android:id="@+id/expandable_fab_layout"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:efab_layout_fabOptionOpeningAnimationDurationMs="0"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <com.nambimobile.widgets.efab.Overlay
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

        <com.nambimobile.widgets.efab.ExpandableFab
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom|end"
            android:layout_marginEnd="@dimen/fab_end"
            android:layout_marginBottom="@dimen/fab_bottom"
            android:contentDescription="@string/tools"
            app:efab_closingAnimationDurationMs="300"
            app:efab_closingAnticipateTension="0"
            app:efab_icon="@drawable/ic_arrow_up"
            app:efab_iconAnimationRotationDeg="180"
            app:efab_openingAnimationDurationMs="300" />

        <com.nambimobile.widgets.efab.FabOption
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:fab_icon="@drawable/ic_pen"
            app:label_position="left"
            app:label_text="@string/pen" />

        <com.nambimobile.widgets.efab.FabOption
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:fab_icon="@drawable/ic_eraser"
            app:label_position="left"
            app:label_text="@string/eraser" />

        <com.nambimobile.widgets.efab.FabOption
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:fab_icon="@drawable/ic_color"
            app:label_position="left"
            app:label_text="@string/color_palette" />

    </com.nambimobile.widgets.efab.ExpandableFabLayout>

</androidx.constraintlayout.widget.ConstraintLayout>`

The result on android 12 when pressed fab option is here. On android 7 it show shadow.

kabumere commented 1 year ago

Hey @frankmungnodev,

Sorry, I have been sidetracked by other life events recently. If you are still using the library, please send a new screenshot so I can see the issue (the current link has expired). If you are no longer using the library, thanks for giving it a try and I hope you try it again in the future.

kabumere commented 1 year ago

Closing ticket. If anyone else experiences this, feel free to make a new ticket.