Sort
In this lesson, we will look at sort functionality for the blog list screen. The sort functionality will be available throughout the dialog which can be accessed via the toolbar menu.
We'll cover the following...
Final result preview
Toolbar menu
Similarly to the layout files, toolbar menu can be defined by XML tags and attributes. Let’s create a main_menu.xml file in the res/menu folder.
Define a root menu tag along with a child item tag. The item tag describes menu item properties, via XML attributes:
idattribute specifies the unique id of the menu itemtitleattribute specificities title of the menu itemshowAsActionattribute specifies whether we want the