Questions tagged [android-tabhost]

Display a sub list of tab labels representing each page in the parent's tab collection.

Displays a list of tab labels representing each page in the parent's tab collection. The container object for this widget is TabHost. When the user selects a tab, this object sends a message to the parent container, TabHost, to tell it to switch the displayed page. You typically won't use many methods directly on this object. The container TabHost is used to add labels, add the callback handler, and manage callbacks.

Reference: Android Developers Tabhost

2122 questions
0
votes
1 answer

Android tabHost?

I am trying to create a tab host to but I cant seem to make it work, what am i doing wrong? I have setup up createTab() on my onCreate method but it crashes. I am simply creating a tabhost that holds around 5 tabs. Also I am trying to implement…
DaveDave
  • 293
  • 1
  • 2
  • 10
0
votes
0 answers

Android Tab data not showing on back navigation

My usecase is as follows: I have to fetch some data from the web endpoint, and I have to add tabs to the TabHost. Every tab has a listview, which will further get populated with data from a different web service. So far, I have able to add tabs…
Nitish
  • 3,097
  • 13
  • 45
  • 80
0
votes
1 answer

Placing Tabs in DialogFragment

I am attempting to place TabHost inside of DialogFragment but at present it is none functional and returns null on the line: tabs.findViewById(R.id.tabHost); How can tabhost be initialized in the DialogFragment to allow the tabs to appear? Tabbed…
Sauron
  • 6,399
  • 14
  • 71
  • 136
0
votes
1 answer

How to implement TabHost with the ability to use multiple activities under a tab?

As the title says, I want to know how to implement TabHost with the ability to switch between activities under a tab.Simple example would be to have two tabs(tab1 & tab2) with a button under tab1. when this button is clicked, a text…
la theos
  • 45
  • 3
0
votes
1 answer

Android Studio - getChildFragmentManager / android-support-v4

I cannot solve the problem with android-support-v4. All "Extras" including "Android Support Repository (11)" and "Android Support Library (21.0.3)" - Installed. I was trying a lot of ideas which I found, but nothing help. I am AndroidStudio…
0
votes
0 answers

Error adding tab using TabHost

I am trying to create tabbed view using tab host like below but app gets forced closed... I am trying to create tabbed view using tab host like below but app gets forced closed... I am trying to create tabbed view using tab host like below but app…
Darpan
  • 33
  • 5
0
votes
1 answer

(TabHost) findViewById(...) returns NULL, Android

I set tabHost = (TabHost) findViewBiId(android.R.id.tabhost); And it comes out NULL. I have a MainActivity that extends ActionBarActivity and implements ActionBar.TabListener, as follows... MainActivity public class MainActivity extends…
0
votes
1 answer

Android could not change tab icon

In my Android application, I am using FragmentTabHost. I have added 3 tabs in the tabhost now my problem is I could not change the tab icon dynamically when choose each tab. My requirement is if I select a tab other tabs icon should be changed, I…
M.A.Murali
  • 9,988
  • 36
  • 105
  • 182
0
votes
1 answer

TabHost - everything in first tab

I'm working with TabHost and I want to have two tabs, but everything I have in second tab is in first tab and there is no tab button to be clicked. Here is how it looks like. I just dragged and dropped tabhost in Design editor in IDEA
miskohut
  • 957
  • 1
  • 14
  • 34
0
votes
1 answer

SupportMapFragment issue in nested TabHost Fragment

I have 1 FragmentActivity 1 main fragment and 2 tabshosted child fragment one is for listview another for map. I have 2 problems here. First one is that I have to prevent recreation of child fragments on every tabchanges. Second problem; the first…
0
votes
1 answer

Android Application is crashing after adding TabHost

I am making an an application which can add contacts to your phone contact list by watching tutorials however when i add Tabs to my application and run it,it crashes and message has been shown that my app has been stopped unfortunately This is my…
0
votes
2 answers

Android adding an image to the left of TabWidget and an edittext right of it?

I would like to have a layout like below Image TabName1 TabName2 TabName3 EditText <-------------------- Tab Content ----------------------> My xml below is not working. The image would show on top of tabs and the edittext is not even being shown at…
Eddi
  • 479
  • 5
  • 22
0
votes
1 answer

TabHost HomeUp Button

I have a TabHost with 5 fragments. One of the Fragments leads to an Activity. When I press the back button in that activity it will lead me back to the fragment that started the activity, however if I press the home-up button in the actionbar it…
Max Kleine
  • 143
  • 1
  • 1
  • 11
0
votes
1 answer

android best practice: Adding tabs below ActionBar using ActionBarActivity

I'm finding a lot of conflicting information as to the best approach for adding tabs below an ActionBar in ActionBarActivity (sub class of FragmentActivity, from the support libs). I'd like them to look visually similar to the tabs in the Play Store…
Wise Shepherd
  • 2,228
  • 4
  • 31
  • 43
0
votes
1 answer

How to refresh tabhost inside a fragment?

I have placed my tabhost inside a fragment. Tab host is having two tabs. I am using below code tabHost.addTab(tabHost.newTabSpec("TabA").setIndicator("TabA"),TabA.class, arg1); tabHost.addTab(tabHost.newTabSpec("TabB").setIndicator("TabB"), …
Debdutta
  • 25
  • 6