Here's a long shot and I've never tried it to see if it works:
- Create a special class which contains
onClick
methods for the elements in your footer. import
this class in every Activity
you have;
- Use
android:onClick
in your included XML file with values pointing to methods in that class.
Now, I'm not sure whether this class would need to be instantiated in every Activity
or if you can use its methods as static, but something like this should work and it's still better than adding the listeners to every activity.
In my opinion (and I emphasize that it's just my opinion), this interface paradigm as you call it is a poor attempt to copy the iPhone. This paradigm is very popular on the iPhone, mainly because it only has one button. I even hate the Engadget app for doing it (and again, it's copied from the iPhone app) -- it wastes screen real estate.
In short, my advice: use the MENU button.
Last note: never played around with a TabLayout
, but if you want a separate Activity
in each tab then I'm 99.9% sure you can't do it (you can't embed whole activities in any kind of View
or ViewGroup
). The TabLayout
only houses child Layout
s, not activities. Also, with the TabLayout
, you can say bye bye to the BACK button (are you going to waste yet another button to copy a UI from the iPhone?) -- unless you plan to override it, in which case you can say bye bye to your users.