How can I use VectorDrawable with the Android Toolbar?

Viewed 10052

What is the proper method to use the new VectorDrawable in the toolbar?

I tried to use the app:srcCompat element as illustrated below, but nothing showed up.

<menu
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto">
  <item
    app:srcCompat="@drawable/ic_clear"
    app:showAsAction="ifRoom" />
</menu>

I have my own toolbar layout using android.support.v7.widget.Toolbar and Android Support Library v23.2 on JB (16).

1 Answers
Related