I wanted to do a search in the application. After clicking on the "Loupe" button (which is a Menu item), the Toolbar should change.

I onOptionsItemSelected in the onOptionsItemSelected method onOptionsItemSelected But after calling the setSupportActionBar (searchToolbar) method, nothing changes. Tell me how to do this?

enter image description here

  • In today's Android Weekly there was an article on this topic. I advise you to subscribe to the newsletter (and read past newsletters) - you will learn a lot of interesting things. In general, you do not need a magnifying glass button, but a SearchView widget, everything has already been done. - pavlofff

0