Configuring the floating action button
So far, our layout provides only one action, the add action button on each list item. This will be used to include that filling in the user's eventual sandwich. It is always a good idea to ensure that the user is never more than one click away from spending their money, and so we will add a checkout function to the activity.
The first thing we will need is an icon. Probably the best source for icons is the asset studio we used earlier in the book. This is such a great way to include icons in our projects, mainly because it automatically generates versions for all available screen densities. However, the number of icons is limited and there is no checkout basket. We have two choices here: we can find an icon ...
Get Android Design Patterns and Best Practice now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.