Android FAB plus sign not present on android drawable

You can find the plus icon on the Vector Asset Studio.

  1. In Android Studio, open an Android app project.
  2. In the Project window, select the Android view.
  3. Right-click the res folder and select New > Vector Asset.
  4. Click the Android icon Button and look for the plus sign

More info here: https://developer.android.com/studio/write/vector-asset-studio.html#materialicon

You can get the Material Icons:

1.Online – from the Material Design Website. The plus icon is called ‘add’. Select the icon, pick a colour & size and download the png or svg resource.

2.From Android Studio – using Vector Asset Studio. Check the link for more information. (as suggested by Wilder Pereira in the post below)

based on @Dagnogo’s answer, I found this is the simplest way.

    <android.support.design.widget.FloatingActionButton
    android:id="@+id/fab"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom|end"
    android:layout_margin="@dimen/fab_margin"
    app:srcCompat="@android:drawable/ic_input_add"
    android:tint="@android:color/white"/>

The key is using tint property

Leave a Comment