With creating a Archbar without the arrow icon in the left corner?

Asked

Viewed 48 times

0

I need to create a Toolbar with a searchview that works like the first two images: When this searchview opens it needs to overlap the image(logo) and extend all over 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 stand is just pushed into the corner (fourth image). Some way to get the result shown in the first two images: soon being superimposed and without the arrow in the left corner?

inserir a descrição da imagem aqui inserir a descrição da imagem aqui inserir a descrição da imagem aqui inserir a descrição da imagem aqui

  • Have you tried app:iconifiedByDefault="false" and app:searchIcon="@null" ?

  • I tried here and it didn’t work no, but it pointed a way. I’ll keep trying.

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.