I would like to create a actionbar, let it like gmail’s actionbar.
In other words,
When the item is selected in listView, actionbar’s logo will change to the Cancel button.
Does this have to custom actionbar’s layout?

or , it is not a actionbar ,it’s a Contextual Menus?
thanks @Selvin and @CommonsWare
it’s a context-menu,
ListVieworRecyclerView, and you can just callstartActionMode()to start it (API 11 or later).But in
startActionMode(), it will not callonItemCheckedStateChanged,you must implement a click listener from the adapter by yourself.