Android TabHost show tabs in all the activities - android

In my Android app I'm using TabHost to work on some tab functionality. tab works fine. but in my app each tab contains several icons related to activities and when each activity starts it take over the whole screen. instead I want to show tabs when all the activities are running.
for instance take following screen as my tab view.
and when I click on the icon the second screen is as follow.
in there I can't see the tabs and in my case I wanna be able to see the tabs in the second activity too.
how can I implement this. can I use Fragments in this. Thanks and regards.

Related

Android Tab that holds other Tabs

Basically, right now I have an Android app that has four tabs on the top. One of the tabs is 'Settings', but instead of it being on of four tabs I have, I want it to be inside another tab called 'Demos,' so when someone clicks the 'Demos' tab, they can click a button to open the 'Settings' page and in the future any other activity tabs I want. A screenshot is below of what the iOS equivalent is if what I wrote is confusing. Thanks.

Android Honeycomb - Tab

Previously I wanted to use Tabs on top of the page using TabActivity.
As I am working with Honeycomb I used Action Bar Tabs. That worked best for me.
Now, I want to use tab to on Login page, so that user can Log in two diff ways. For this, I thought I will put Tabs at the top of Login layout (center of the page and not top of the page).
Can I do that ? How?
you can have a tabhost with multiple views and even multiple activities in each tab.
Here is a tutorial : http://joshclemm.com/blog/?p=59
The tab host doesn't have to occupy the whole screen you can have something else on top, I sometime put a textview with the title.

How to make tabs visible in whole application?

I am developing an android application in which i have created five tabs and when i click any of the tab a new activity is called ,
my problem is
like i go from one tab to another tab and a new activity is called ,till then the tabs are visible but when i go to next activity from that activity the tabs disappear ,
all tabs are visible on five activity which are called on tabs but not in the inner activites like
Activity1 ---- > Activity2 ---- -----> Activity3
my question is how can i make the tabs visible in all the activities in the application
Since ActivityGroup is deprecated, I suggest you use Fragments and the ActionBar. Use the compt lib to support older versions of Android.
The sdk samples has a good example you can refer to.

How to load Activity without animation (like tabs in TabHost load activities) on Android?

I've set up a TabHost containing a TabWiget with three tabs in it - each of which loads a separate activity. This all works well, switching between them is smooth, state drawables on tabs work well and so on.
However, in each activity (i.e. tab contents) I need to load further activities while still showing the tab bar at the top. Problem is, doing this:
startActivity(new Intent(this, SomeActivity.class);
loads the activity, but with a sliding animation. This looks weird when I'm supposed to have a fixed tab bar at the top (i.e. it slides out and back in). Switching activities with the tabs does not trigger this animation.
How can I load an activity without the sliding animation? I have no problem doing it through the TabHost if that's required, but its API didn't suggest this was possible.
Using ActivityGroup for the tab contents, and then managing their content with getLocalActivityManager seems to be the trick: http://blog.henriklarsentoft.com/2010/07/android-tabactivity-nested-activities/

Android: How can I open up new activitys in the tab content, instead of full screen?

My Android app is created with a tab bar and the root activity is extending TabActivity. The problem I have is that I always want the tab bar to be visible.
Lets say that one of the activitys in one of the tabs have a button and when I tap that button I want to open up a new activity with the following code:
Intent intent = new Intent(this, MyActivity.class);
startActivity(intent);
The new activity opens up in full screen over the tab bar. I want it to show up in the FrameLayout where I have the tab content so that the tab bar is still visible. I want to use an activity so that I can use back stack etc. This must be standard in an app using a tab bar, so what am I doing wrong here?
I'm not sure but i think that if you want the activity to display within the tab content you should declare a tabspec, like for regular tabs, or directly set the TabHost current tab to the tab/activity you want to display?
To create a tabbed layout you should use a TabHost and a TabWidget as described here.
Seems like it is like Cristian says, there is no good way of doing this
From what I understand from that post there is a way but it is a "hack" and that Android isn't built to use this idea of an UI.
I have some questions about this, though:
So if my app is divided into five different large parts, that is perfect to divide into tabs (like I do on the iPhone). How would you solve this UI in Android in a good way without a tab bar? Or should I use a tab bar but open up new activitys full screen?

Categories

Resources