I have seen in Google's Inbox App, composing a new email, in the toolbar instead of the back button (an arrow) it has a "close" button (see picture). 

How can I achieve this?

![inbox compose close button](https://i.stack.imgur.com/nhMUX.png)