Tabs disappears in TabActivity after it goes to other Activities - android

In my app I have four tabs in the bottom of my main screen. When the user click in one of the tabs in the bottom it open an Activity and the user needs to fill up a form, after the form is done it returns to one of the TabActivities.
Everything works well, except when the form is save its supposed to go to the Activity an show the four tabs in the bottom. The problem is that the tabs in the bottom disappear.
I thought the if Im calling the TabActivity it will always show the tabs that were assign in the XML layout.

Okay you have to go for ActivityGroups. But in later version of android Activity Group is deprecated and hence you have to go for fragments or views. Here are few links which will get you started.
ActivityGroup Example
http://blog.henriklarsentoft.com/2010/07/android-tabactivity-nested-activities/
http://united-coders.com/nico-heid/use-android-activitygroup-within-tabhost-to-show-different-activity

Related

Using a single button going through multiple fragments

I am developing an app in which I have an on boarding. I have a "next" button at the bottom of the layout which will load the next fragment. The problem is how to do this when I will have to go through 8 fragments. The order in which the fragments will be displayed, never changes. Should I use a counter or should I ask which fragment is being displayed and then go to the next? Any help is welcomed, thanks.

Slide menu display same for all pages Android

I am trying to make an App on android. I have made the slide in menu bar like the one shown in the the picture below. The blue bar. Now what I want is that my every screen should show the same menu options. Not those with the back button. How do I do that? Should I make one header and call that in every class? Right now I have an Activity and everything else is a fragment.
I can post my code here as well.
make a Parent Activity and make this acion bar in it.inherit your all activities from this parent activity and just remove setContentView(R.layout.layoutname) from your child activity.
this works in your scenario when you are using fragments so you don't need the layout for activity. so your fragment container would be your parent activity..

Android load fragment content only when it is visible

I have a single activity which has a tabPageIndicator at the bottom of the screen. . The first four icons need to open other fragments. The final icon needs to open an alert box with options to open other screens.
I am facing two problems:
ViewPager loads all the 4 fragments at once and there is a lot of data being processed in the background. I would like to know if there is any way to load content only when the fragment is visible to user. I tried using setPageLimit but it did not work.
My second problem is that I would like to ideally open a popup when the last icon is clicked, rather than opening another fragment. IS that possible?
I am not sure if viewPager supports view without fragments.

Switching between tabs hosted inside a TabActivity, without finishing child activites

I have a three tab layout which contains three forms.
I want to switch between tabs and when I move to tab two from tab one after filling the form, and when I navigate back to tab one, I want to display the previously filled content.
How can I achieve this?
Any suggestions.
Thank you.

ActionBarSherlock TabNavigation

I have gotten my tabs up and running with Sherlock Fragments. So i have two tabs and two fragments. Now what i want is that when i click on a button in one of the fragments, I want another fragment to open up, but it should be inside the tab that contained the original fragment. Can anyone show me how this can be done ?
Actually Nested Fragments are not possible directly. I had a similar issue and but the Fragment to be shown was small and simple. So I just played with setVisibility() as LinearLayout.GONE and LinearLayout.VISIBLE
On the Fragment initialization, I hid the second layout and when I need to show the other fragment, I hid the first layout and showed the second layout. It worked great for me!

Categories

Resources