Reputation: 1033
I want to use fixed header and footer in my android app, but every time a new activity starts, the page refreshes and both the header and footer reload.
How can I make them fixed through out the application life cycle so that they never reload, although I can hide, remove and add items to them?
I've used the include tag and it's not what I want
Upvotes: 0
Views: 1335
Reputation: 3029
You may use one Activity with header, footer and the content Fragment. Instead of starting new Activity, you'll change the content Fragment.
But. This is not expected neither by Android nor by user. Also you need some kind of Back button handling, state saving/restoring and so on. Are you sure that you want to do what you described?
If so, here are some useful links:
Also if you want to use fragments on Android prior 3.0 (API level 11), you'll need the Support Library For custom transit animation
Upvotes: 3
Reputation: 1642
You can use Include tag which can include layout which you want . in every layout of your app just add Include tag as header and footer of your layout
Upvotes: 0
Reputation: 1451
Here what give you is the sample example how to have a fixed header and footer all over the application
Upvotes: 0