1

I have a fab(floating action button), here is it's XML code

<android.support.design.widget.FloatingActionButton
        android:id="@+id/floatingActionButton3"
        android:layout_width="30dp"
        android:layout_height="30dp"
        android:layout_marginEnd="28dp"
        android:layout_marginTop="32dp"
        android:clickable="true"
        android:focusable="true"
        app:backgroundTint="@color/vert"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:srcCompat="@drawable/ic_check_circle_black_18dp" />

As you can see in the code I want the icon "ic_check_circle_black_18dp" to be on my fab. When I click on "design" I can see the icon on my button, but when I launch my app on my phone (7.1) there are no icons.

I already checked the following questions : AppCompat 23.2 use VectorDrawableCompat with RemoteViews (AppWidget) on API<21

Why is my floating action button not displaying its image properly?

I can't find any solution to my problem

Jaymin
  • 2,879
  • 3
  • 19
  • 35
AlexMel
  • 21
  • 7

1 Answers1

-3

Well, i avoided the problem by using ImageButton instead of Floating action button and it works.

AlexMel
  • 21
  • 7
  • What a useless answer! This should certainly not be chosen answer. it's like comparing "Apples and oranges'! – sud007 Jul 15 '20 at 15:07