FragmentActivity TabHost with fragment and activity

I need to implement such a hierarchy of charts in my application.

hierarchy

I have 5 tabs from TabHost . One of them should be the Activity causing a certain behavior. This only one action should have: landscape orientation and portrait , but Fragments should have only one (portrait).

Each portrait layout should have tabs below, but this one action should not. I managed to execute it with 5 fragments inside TabHost , but I found out that I can do this with only one action and 4 fragments or with all 5 actions.

There will be no problem with 5 actions (FragmentActivities), but I prefer to have fragments. I think I should extend FragmentActivity and TabActivity in MyTabActivity (this is Activity with TabHost), but I cannot extend two classes in JAVA. No luck, there is no such class as TabFragmentActivity

So my question is: can I get an effect like in the diagram above ?

PS Maybe I went missing because I just started with Java / Android - that might be the key.

+6
source share
1 answer

You have a solution to the problem: http://droidapp.co.uk/2012/05/25/android-dev-actionbarsherlock-tabs-viewpager/ and here is the source code: https://bitbucket.org/owentech/abstabsviewpager/

which the

This is a tutorial for working with action bar, tabs, viewpager and snippets ... and support> 2.3, so it seems to solve all your needs.

0
source

All Articles