I have this application that I am working on and the user can mark some items as a favorite. I want to use a heart shaped button for this functionality instead of the casual one
You can use VectorAssets as below in XML.
You can create VectorAssets doing: new Vector Asset > Change Icon -- Here you can choose love vector asset. These VectorAssets, you can store in the drawable folder. Then you can import than in your XML layout file as
@drawable/
For the demo, please see below picture. The VectorAsset XML file is ic_favorite_black_24dp
You can change the color of the VectorAsset also. On click, you can replace VectorAsset with another Red colored VectorAsset to represent it favorite and so on.