I have a tabbased application. On one of my tabs I have a listview with productcells. When the user taps the row a new activity is launched. Is it possible to start the new activity as normal but without “losing” the tabbar at the bottom. Because now my tabbar is gone when I start the new activity. Much like the navigation hierachy on iOS?
Share
This is what you are looking for:
http://blog.henriklarsentoft.com/2010/07/android-tabactivity-nested-activities/
It basically explains how to use
ActivityGroupto achieve that effect. I usually don’t recommend this approach, not only because sometimes gets a PITA to handle but because it too iPhone-like. Remember, you are developing for Android.Edit: with regards to Mur’s comment… it’s not a matter of fanaticism (I even own an iPhone). So what’s wrong with doing Android apps in the iPhone way? Basically, the Android OS is not designed to be used in that way. For instance, the nested tabs: using
ActivityGroupforces you to handle the back button manually, the activities themselves don’t work as they should (what you do withActivityGroupis getting the Activities’ Views and play with them), you have to create public static non-final objects to handle simple things like showing a dialog, etc.Just saying.