Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Common buttons or tabs at bottom for every activity

I want to put some shortcuts or buttons at bottom of every screen/activity. I understand we can do that by using framelayout/ relativelayout, tab widget etc.

Since, I need it for every activity, do I need to write XML layout for every activity and the button actions again & again? Is it possible to refer a layout and actions on button click etc so that same code redundancy?

like image 883
Prateek Jain Avatar asked Dec 21 '22 20:12

Prateek Jain


1 Answers

Hallo,

You can use the xml tag:

<include layout="@layout/commonfooter" />

to include whatever you have in your commonfooter.xml layout file in another layout xml.

Hope that helps!

like image 100
FrinkTheBrave Avatar answered Jan 07 '23 00:01

FrinkTheBrave