0

I know the title looks weird but this is what I want :

I have two tabs, and under one tab I have an activity that has a file list. When you click on a file it normally shows a panel next to it (which is another activity). But now, since I have tabs, when I click on a file it jumps to a full screen activity with the file description and the tabs are gone. I would like to make this second activity a sub-activity of the main where we can select a file so that the tabs stay still.

Any ideas ?

Thanks, Nic.

  • 1
    You should take a look to the fragment support. What are trying to get with Activity is achievable with fragments. You have a Central container, under you tab where you show your data, and you want to replace the content of the container when you click on file – Blackbelt May 28 '13 at 11:55
  • The thing is, I already created those activities and they each have a corresponding fragment but I recently added a tab, it worked fine before without them –  May 28 '13 at 11:58
  • What's the difference between fragment and activity if you have a Single Fragment for every Actvity? – Blackbelt May 28 '13 at 12:18
  • The activities that extend FragmentActivity are just taking care of the layout, the ui, and the fragments that correspond to them are doing calculations, they feed them –  May 28 '13 at 12:22

1 Answers1

1

Tab host with fragments should solve the issue.
You may like to read this - http://android.codeandmagic.org/2011/07/android-tabs-with-fragments/

Anukool
  • 5,301
  • 8
  • 29
  • 41
  • What if I already have all my activities with their corresponding fragments ? I would have to make my activities fragments eh? –  May 28 '13 at 12:02