Special TabHost that allows the use of Fragment objects for its tab content. When placing this in a view hierarchy, after inflating the hierarchy you must call setup(Context, FragmentManager, int) to complete the initialization of the tab host.
Questions tagged [fragment-tab-host]
296 questions
5
votes
1 answer
How to implement custom tabs in Android like Instagram
I am trying to implement custom tabs UI in bottom like that of Instagram (screenshot is attached). I want the middle tab to open another activity instead of opening a fragment inside the same view.
I feel that this is implemented using imagebutton…
![](../../users/profiles/3809543.webp)
arpitgoyal2008
- 487
- 7
- 24
5
votes
0 answers
Android TabHost transparent background and show underneath list
I searched a lot about this issue and applied those solutions but couldn't succeed. I need to apply transparency to FragmentTabHost and show whatever underneath that TabHost.
I also applied transparent color to all the five tabs 1 by 1, but that…
![](../../users/profiles/4449104.webp)
Mohammad Bilal
- 51
- 3
5
votes
1 answer
using a FragmentTabHost with a ViewPager
I want to create a swipe tab interface using a FragmentTabHost with a ViewPager. So far I got the Fragments to slide. The only thing that's happening is that the fragments are able slide behind the tabs which are disabled/stuck and not working. How…
![](../../users/profiles/2246264.webp)
Anafam
- 127
- 1
- 2
- 12
5
votes
1 answer
Are label and icon mutually exclusive in a TabHost TabSpec setIndicator?
On an Android app (min sdk 11, target sdk 18), a class which extends Fragment ought to create the TabHost tabs (TabSpec) with one label AND one icon. But...
TabSpec ts1;
// if the label is set to "Home", the label is displayed but not the image
ts1…
![](../../users/profiles/2515265.webp)
Javide
- 2,069
- 2
- 34
- 52
5
votes
3 answers
Fragment getting overlapped on another fragment
I know there are various question posted on SO related to the question but none of them provides solution to me. I've 4 tabs in fragment activity and each tab has its own fragment. I am going into another fragment inside it. When i switch to tabs…
![](../../users/profiles/1226882.webp)
moDev
- 5,163
- 4
- 31
- 63
5
votes
1 answer
findFragmentByTag - looking for fragment in FragmentTabHost - always null
I'm having trouble getting a pointer to a Fragment which is the currently visible fragment in a FragmentTabhost.
I have a SherlockFragmentActivity called SecondActivity that loads the Tabhost from it's onCreate method like this:
if…
![](../../users/profiles/1077601.webp)
Darren
- 9,325
- 19
- 83
- 140
4
votes
1 answer
Tabhost content not showing when i upgrade android.support.v4
I am using TabHost and it was working fine till I updated the support library. When I updated the jar then tab content is not visible, only showing tab.
I am using FragmentActivity.
Here's the XML :
![](../../users/profiles/2345946.webp)
Ashish Agrawal
- 1,901
- 2
- 16
- 31
4
votes
1 answer
Xamarin Android - Using FragmentTabHost in a Fragment
I have a navigation drawer app that I'm making that uses Fragments. I'm trying to create a Fragment that uses tabs with a FragmentTabHost. The problem that I'm having is that the content I'm expecting in the tab is not there. It's just a blank…
![](../../users/profiles/2061451.webp)
Jared Price
- 4,489
- 7
- 40
- 70
4
votes
0 answers
Fragment overlapping
I am using TabHost and Fragments. I have 3 tabs in TabHost. In first tab, I have 3 fragments and user can switch among them any number of times. My problem is that sometimes frgaments overlap each other. Similar questions have been asked by many…
![](../../users/profiles/2261466.webp)
seema
- 961
- 1
- 11
- 26
4
votes
1 answer
Why Tab host not showing icon in android?
Here is the code to setup the tabhost, however there are two problem
The text will go to next line if it is too long, can I reduce the
size and force it to single line?
All icon do not show, even I am sure the image src is correct
public class…
![](../../users/profiles/782104.webp)
user782104
- 12,011
- 51
- 154
- 289
4
votes
1 answer
Add fragments to Tab host
How to use a tabhost in android to control fragments.i have one activity and four Fragements and its corresponding xml files.i add my tab host in main_layout_activity.xml file.there i have another Linnerlayout i want to replace this linnerlayout…
![](../../users/profiles/2514972.webp)
VenushkaT
- 1,152
- 2
- 18
- 42
4
votes
1 answer
Android interfacing
I always have this problem of java.lang.IllegalStateException:Could not execute method of the activity. I was planning to perform an android component event (ex. Button event - indicating the number of times this button was clicked). Here's the code…
![](../../users/profiles/999452.webp)
David B
- 2,725
- 11
- 44
- 76
3
votes
0 answers
Semi Collapse and Semi Expand Fragment Tab Host
In one of my projects I have implemented CustomTabHost from https://stackoverflow.com/a/19467434/3484668
What I am trying to do is semi-hide the tab host tab widget when clicked on a second child tab widget and then expand it if clicked again.
Here…
![](../../users/profiles/3484668.webp)
Rushi M Thakker
- 662
- 2
- 11
- 32
3
votes
1 answer
GoogleApiClient.Builder.enableAutoManage in Fragment throws IllegalStateException: Recursive entry to executePendingTransactions
I have an AppCompatActivity that has 3 tabs using FragmentTabHost. One of the tabs uses LocationServices. I would like to have the smoothest possible user experience:
If the LocationService is off in the android system, and only if the user chooses…
![](../../users/profiles/661589.webp)
Gavriel
- 18,088
- 12
- 63
- 98
3
votes
0 answers
Illegalargumentexception with fragment transaction commit
I am developing an App with TabHost, which contains 4 different Tabviews. Each tabview contains different fragment views added with following code
FragmentManager manager = getSupportFragmentManager();
FragmentTransaction ft =…
![](../../users/profiles/1164665.webp)
Timson
- 1,317
- 3
- 19
- 31