Custom title bar and layout with title

I recently thought about adding a custom title bar to my application (using "find me" and the home button, etc.), and then I thought, what is the reason for using a custom title bar on top, not just a regular layout and using it as an include tag at the top of my XML

What are the pros and cons of each? Is there any difference?

EDIT: one difference discovered so far is that the custom title bar has shadows automatically

+3
source share
2 answers

To return to the previous and home header buttons, you must define a normal layout for the same. Because it's easy to implement compared to a custom title bar. And we can create a normal layout, as we want, with any color / height / width / frame of the image, etc.

I suggest you go about defining a normal layout for the header instead of setting your own title bar.

0
source

You can extend LinearLayout to create a new layout with your title bar. The advantage is that you can customize the title bar for various actions that use it. Some may not display the search button, for example.

If you use include in XML, you do not have the same flexibility. I would create a custom layout with a title.

0

All Articles