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
7
votes
3 answers

Android keyboard puts tab bar on top

I have a little problem when I open keyboard in my application. I have a tab bar which is on bottom of page and in some situations, not always when I click on edit text and keyboard shows up, it's moving my tab bar on top of it. Here is an example…
Android-Droid
  • 14,365
  • 41
  • 114
  • 185
7
votes
3 answers

How to switch or change between the tabs in android sdk graphical layout?

I am trying to change or switch between two tabs that I have within the eclipse graphical layout so that I can see the elements on the other tab. Is this possible? the only way I could see of doing this is to make the second tab, briefly be the…
TimCS
  • 363
  • 1
  • 7
  • 17
7
votes
2 answers

How to set selected tab must be in middle

I am new to Android and in my project I have requirement i.e I have six tabs but I show only three tabs on screen and for rest of tabs…
7
votes
1 answer

How to create tabbed layout in Android 4.0?

Now that TabActivity is deprecated, what is the proper way to build a tabbed interface using fragments? Every tutorial I have seen takes a different approach. Some of them are supremely complicated pushing a mundane programming topic to the rocket…
RajV
  • 6,860
  • 8
  • 44
  • 62
7
votes
3 answers

Android: customizing the look of Tabs using TabHost & TabWidget

I opend a post about this before but I feel that I can now (after reading some other posts) better explain what I want and rephrase it so it will be better understand. I followed the tutorial about Tab Layout on the dev guide and I managed to create…
Belgi
  • 14,542
  • 22
  • 58
  • 68
7
votes
4 answers

Android: How to call function of Activity inside of tab from the tabhost

I have a tabhost with three tabs. Each is an activity. I would like to have a button which is in the action bar, the bar along the top with common buttons, call functions of the tab which is active. For example, an add function which could add…
Anthony Graglia
  • 5,355
  • 5
  • 46
  • 75
7
votes
2 answers

TabHost / TabWidget - Scale Background Image?

I need to scale my TabWidget background images so they maintain aspect ratio. I am using a TabHost with a TabWidget. I am then using setBackgroundDrawable to set the images. I found a close answer here - Background in tab widget ignore scaling. …
user359519
  • 711
  • 2
  • 16
  • 28
7
votes
1 answer

Android - FragmentTabHost gives me "No tab known for tag null"

I have an activity that uses a TabHost associated with ViewPager. Although it works fine, I decided to replace it with FragmentTabHost. However, after making some changes, I am getting a rendering exception whose messages is as…
user2062024
  • 3,541
  • 7
  • 33
  • 44
7
votes
2 answers

Replace one fragment to another fragment in the TabHost

I am creating a five tabs that contains one fragment each. I am using ListView in the first tab and in the ListView OnItemClickListener I want to replace from the first Tab Fragment to second tab Fragment. How can I do that by using Fragment and…
It's me
  • 1,065
  • 6
  • 15
  • 30
7
votes
1 answer

Android Fragment vs. Activity Group

I am working on an Android App where I want to implement an Activity Group for each tab. But since Activity Group is deprecated I have to use Fragments. I googled the last days and did some research on that topic but I still don't get it. The…
Bins Ich
  • 1,822
  • 6
  • 33
  • 47
7
votes
3 answers

Android how can i replace the deprecated tabhost?

I'm going to create an application which is designed to use Tabhost, but as I know it's been deprecated. So my question is should I use Tabhost anyway or how can I replace it..by using buttons instead of them declared in every xml or any other…
Android-Droid
  • 14,365
  • 41
  • 114
  • 185
7
votes
2 answers

Inflate a layout with ImageButton inside Fragment programmatically

I am new on android development, and i was currently creating an application using tabhost and a TabActivity to switch between different activities. This application was working fine, but I recently discover that TabActivity are deprecated and I…
Digoun
  • 383
  • 1
  • 4
  • 12
6
votes
2 answers

Android: How to build tabs like the ones show on Android UI Page

So android goes out of its way to build this nice UI guide for everyone to use. But I don't see anywhere where it shows code examples of how to build these elements. The UI guidelines for tabs can be found here.…
S.A.Jay
  • 421
  • 2
  • 9
  • 23
6
votes
3 answers

Setting selected TAB with a small triangle below it

I want my tabs to show like in the image with small triangle below it.Is this possible ?If yes, then help me with some codes or documentation.
Shahzad Imam
  • 2,030
  • 2
  • 26
  • 45
6
votes
1 answer

Switching from TabHost to Fragments with Viewpager: Where to put all my Code

Until now I've used TabHost for my App to create 3 Tabs. Each Tab is represented by an Activity in which I get the layout via setContentView(R.layout.something) from an XML file. So 3 Tabs, 3 Activities and 3 XML files. Now I've stumbled upon…