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

How to Detect dragging in my mapView which is in a fragment controlled by tabHost?

As described, i have a mapView in one of the fragments that are controlled by tabhost. I tried to set an onDragListener for my mapView so i can disable the parent's scrollview whenever user tries to drag the map but the listener won't fire. Can…
soulless
  • 383
  • 1
  • 5
  • 18
0
votes
0 answers

Listview within TabHost using SQLite Database List Population Issue

I am using Tabhost and inside each tab I am using the same listview activity with an SQLite database to populate the list. My question is how would I get the list to show different items for each tab? I have tried passing the tabId through the…
Will Bell
  • 161
  • 1
  • 1
  • 6
0
votes
1 answer

How to change tabs according to the day?

What changes should i make in the code so that Tabs are opened according to the system Day (ie Monday, Tuesday...)? In the last code i have used calander class to get the Day from the system but how can i implement it in the 1st and 2nd code so that…
0
votes
1 answer

Tab navigation after validation using tabhost

I am new to using TabHost and currently trying to implement a validation check when moving between tabs. My problem comes with the use of onTabChanged(String tabId) as i need to know what the selected tab is so as, if validation fails, i can…
user3682205
  • 241
  • 4
  • 16
0
votes
2 answers

Text Through over code in Android Studio

The same code works in eclipse but doesn't work in Android Studio. In Android Studio there is text through in many functions. Check Out in image in the link below http://postimg.org/image/d4sdh9t71/ package…
user5011938
0
votes
2 answers

TabHost's getTabWidget() returns null although the object contains mTabWidget

In my Robolectric test I run my fragment by: sut = new TestedFragment(); SupportFragmentTestUtil.startFragment(sut); In fragment's onCreateView I have android.support.v4.app.FragmentTabHost on which I try to get its tabWidget using: inflatedView =…
0
votes
1 answer

How to launch activity based on tab bar item?

I want to start different activities depending on the click of the tab bar item but I get a blank page as started activity in the "windows class". What I intended to do is start different activities on click of tab bar item. Tab Bar Activity…
0
votes
1 answer

My TabHost HAS a FrameLayout with that id

This is my code: tabHost = (FragmentTabHost) findViewById(R.id.tabhost); tabHost.setup(this, getSupportFragmentManager(), R.id.tabcontent); tabHost.addTab(tabHost.newTabSpec("tab1").setIndicator("Lengüeta 1"), Tab1.class, null); …
Fustigador
  • 6,339
  • 12
  • 59
  • 115
0
votes
1 answer

Tabhost returns null in android when comes back from activitiy and goto tab frament

When I open the application for the first time my tab is working fine. When I come back and go to the fragment page some times it returns null. Please help me ! What am I doing wrong? Here is my code. public class TabsFragmentPagerAdapter extends…
0
votes
1 answer

Android tabHost: How do I open an activity outside the tabHost for just one tab?

I have a basic tabHost with 3 tabs(Say tab1,tab2 and tab3) and the class firing that up extends ActivityGroup(I know its deprecated ;P ). So all tabs open up inside the tabHost Tab1 and Tab2 open up an activity inside the tabHost using the standard…
0
votes
1 answer

App crash on TabHost on some devices only for Android 4.0.3-4.0.4

App crahses on tag only on some devices only for Android 4.0.3-4.0.4. IDE Eclipse. Log is below. I can prevent crash if for set height maximum 30dp. layout\my_space_tabbed.xml:
Kiryl Ivanou
  • 1,015
  • 2
  • 12
  • 22
0
votes
1 answer

Handling tab press inside a activity group to do back press functionality

I am Implementing tabhost with 5 tabs.On 5th tab i have an activitygroup with 2 child activity.From child activity if i press back button the app returns to the parent activity. But what i need is on pressing tab button too it has to return to the…
Arun Inbasekaran
  • 297
  • 1
  • 3
  • 14
0
votes
2 answers

How to highlight a Tab when Notification received

I have implemented Tab host with the Notification. Now My problem is: there are 3 tabs like Food, Health and Service. If i receive a Food Notification How to highlight the Food Tab automatically
0
votes
2 answers

Unexpected visual element in a simple Tab layout

The screen shot below is of a simplified version of the application from the Tab Layout tutorial. You can see a black horizontal line below the tabs. Why is it there and how can I remove it?
Emanuil Rusev
  • 34,563
  • 55
  • 137
  • 201
0
votes
1 answer

Android Tabwidget change Textview color programatically

In below tabview layout contents how to get reference for each textview and change color, text programatically.? For example i want to change RF1235678 textview color and text
Vishwanath.M
  • 6,235
  • 11
  • 42
  • 56