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

2140 questions
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,158
  • 30
  • 98
  • 169
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
  • 909
  • 1
  • 12
  • 31
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
  • 379
  • 2
  • 17
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
  • 133
  • 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,008
  • 4
  • 27
  • 40
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
0
votes
1 answer

Fragments inside a ViewPager - how to get a list of all child fragments

How can I get a list of all child fragments that I have set up using a v4 viewpager with a FragmentPagerAdapter The viewpager exists on the main activity
0
votes
1 answer

Switch between tabs via swipe in android

I was create android application with tab and TabHost but users cant switch between tabs via swipe. I use TabActivity for this app. Users most click on tabs for switch between tabs or activities. MainActivity.Java : public class MainActivity extends…
Erfun
  • 938
  • 1
  • 8
  • 24
0
votes
1 answer

android change FragmentTabHost background and text color

i'm working FragmentTabHost.i created FragmentTabHost and i can replace some fragments.now i want to change background color in FragmentTabHost and also text color.for example i want background color black and text color white.this is a my xml…
0
votes
1 answer

set tab color, divider and text alignment in android

How to set text alignment and divider color in an tabhost widget. mTabHost = (FragmentTabHost) findViewById(android.R.id.tabhost); mTabHost.setup(this, getSupportFragmentManager(), R.id.realtabcontent); Bundle b = new Bundle(); …
yuva ツ
  • 3,583
  • 9
  • 42
  • 76
0
votes
1 answer

Use same xml layout file for TabHost

I have a tab host and I want to use the same layout file for all three tabs. But when I try to do this I only see the layout on one of the tabs not all three. myTabHost =(TabHost) findViewById(R.id.TabHost01); myTabHost.setup(); …
user3692917
0
votes
2 answers

ListView GetView is not Called

I have setup a list view I get some data from the web and then call my method handleData to use the data and put it in my list view but even though I have retrieved data and handleData is called I getView is not called. Here is my code I have put I…
iqueqiorio
  • 989
  • 2
  • 30
  • 73
0
votes
0 answers

FragmentTabHost with fragment switch

I am confused with FragmentTabHost to do fragment replacement. I have a few pages that have some views to click and then forward to another fragment, but after I replace that fragment and then click on other tabs, the fragments overlap…
Simon
  • 461
  • 2
  • 8
  • 20
1 2 3
99
100