how to put a profile image and a searchbar in a toolbar?

67 views Asked by At

I am new to Android development I am building an app but from last three days, I am stuck while making toolbar I am very confused. I want to make toolbar like this in this toolbar the title and image will be set through code in java file when user will login

when search icon is pressed then this toolbar should change like this

and when back button is pressed then again this view appear in toolbar

1

There are 1 answers

0
dazza5000 On

The widget elements in your design are the following from left to right:

Navigation Drawer Indicator

ImageView

SearchView

Toggle

Overflow Menu

These can all be implemented using default widgets. It is not common to put a profile image to the right of the title, but you could do this by putting a custom layout inside the toolbar view.

It is also not common to place a toggle in the action bar, but it is possible using an ActionLayout.