Two techniques can help, sub-class controls and layout fragments. You probably only need to use the 1st one if you navigation is dynamic.
Create sub-classes for some or all of the controls in your navigation bar (which classes depends on your design). This lets you move the code for the navigation bar out of each activity. http://developer.android.com/intl/fr/guide/topics/ui/custom-components.html Create a layout fragment for your navigation bar using a combination of your sub-classed controls and normal controls. Then use the <include /> statement to insert your layout fragement into the each of your activities. http://developer.android.com/intl/fr/resources/articles/layout-tricks-reuse.html /Richard On Jul 9, 2:53 am, Emmen Farooq <[email protected]> wrote: > I need to include a navigation bar at bottom of my application , now > my application has several activities and I want the navigation bar to > be stay across the whole app , so would I include the code for it in > every single activity or is there a more optimal way, -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en

