I have an application that needs the same items [5 buttons acting as tabs] in every screen. Is it possible to create a \"base XML layout\" that has these 5 buttons and then
You may want to look in to the
So what you would do is create a single layout with your button. Put them between a
tag so they do not create a FrameLayout
to get placed in. Then put use the
tag to use the same layout in your other layouts.
NOTE: Always override the layout_width
and layout_height
attributes when using the
tag. This is true even if you are overriding them when the same values. There is a bug in previous versions of Android where it would ignore certain attributes if you didn't override those attributes as well.