With create a searchbar without the arrow icon in the left corner?

0

I need to create a toolbar with a searchview that works like the first two images: When this searchview opens, it needs to be superimposed on the image (logo) and spread throughout the toolbar.

If in my menu I use app: showAsAction="always | collapseActionView" the image overlap happens, but an arrow is displayed on the left side of the searchview, as in the third image.

If I only use app: showAsAction="always" the arrow does not appear, but the view where the logo will stay is just pushed to the corner (fourth image). Some way to get the result shown in the first two images: soon being overlapped and without the arrow in the left corner?

    
asked by anonymous 06.11.2018 / 21:43

1 answer

0

If you are using the v7 toolbar, you can remove this button with this code:

ActionBar actionBar = getSupportActionBar();
actionBar.setDisplayHomeAsUpEnabled(false);

you can read android here and here for more information. Also this question can help

    
06.11.2018 / 22:40