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 Activity call another Activity method

A TabActivity start other activity when i click on a tab, How to send information to parent (tabActivity) and don't finish current activity? My tabactivity start another activity like this…
NicoMinsk
  • 1,716
  • 6
  • 28
  • 53
0
votes
1 answer

How to center tab text vertically

I customized tab layout for tab activity in my Android app. The problem is how to center it vertically. The text is centered horizontally automatically. I tried writing gravity:center, layout_gravity:center. Even more: I tried writing exact height…
Stepan Mazokha
  • 459
  • 1
  • 5
  • 22
0
votes
1 answer

How to structure the tabs in a tabHost in Android?

I'm crating a tabHost to contain all the content of my Android application in 3 tabs, should i create the content of the tab inside its linear layout or create the tab content in a separate fragment and include it in the tab layout? And how to…
0
votes
1 answer

How to pass data between TabHost's Activities in android

I am trying to pass data between two activities of TabHost but not succeded. Here is my code: public class AndroidTabLayoutActivity extends TabActivity { @Override public void onCreate(Bundle savedInstanceState) { …
Parashuram
  • 303
  • 2
  • 6
  • 19
0
votes
1 answer

can it loads content after the tab is clicked? not creating the spec in one go

Now I want to create a TabHost for 3 categories, Pizza, Spaghetti and Snack. Information will be taken form database. Is it possible to access only information of that specific category after the tab is clicked instead of creating it when the…
Jerryc
  • 302
  • 2
  • 5
  • 20
0
votes
1 answer

How to load a fragment view in a tab

I am trying to create tabs inside a fragment. I manage to create tab inside the fragment, but now I want to load different fragment for each tab (fragment1.class and fragment2.class). Can anybody please suggest how can i load each fragment to their…
munimisu
  • 35
  • 5
0
votes
1 answer

Set match_parent size for content's LinearLayout in TabHost (Android)

I can't understand, why LinearLayout with ID "map_tab" (first tab) not have a height "match_parent" in fact? I have a XML-file with TabHost:
whack
  • 1
  • 4
0
votes
1 answer

Android TabHost strange error

Since TabHost itself is not deprecated, and I just need a very simple solution to switch between two controls (maybe 3) I decided TabHost was perfect for my needs. However I get a very mysterious error.... This is the code I have myTabHost =…
Tom
  • 3,587
  • 9
  • 69
  • 124
0
votes
0 answers

Show fragment in TabHost in Android

I have an application which has two tabs and I want to show a fragment in each one. I added a TabHost in the fragment that contains the tabs. The tabs look good like this: But the problem is that the content (the fragments) doesn't show in the…
enoler
  • 179
  • 1
  • 11
0
votes
2 answers

Android use FragmentActivity instead of TabActivity

I want to change TabActivity to FragmentActivity because TabActivity is deprecated. My code is public class Fragment_Activity extends TabActivity implements TabHost.OnTabChangeListener { /** Called when the activity is first created. */ …
0
votes
2 answers

Android - navigate from main activity to tablets activity

In my app I've to navigate from the login activity (normal activity developed with a RelativeLayout) to an activity in which there are a Tab Host. I created the following xml for Tab Host:
lucgian841
  • 1,830
  • 5
  • 34
  • 57
0
votes
0 answers

Android Fragment Tab compilation error

I got a very odd problem. I need to create a three tabs in my activiy. Eveything seems fine, but I got the only ine mistake on the same line everytime no matter is it a part if the code either a comment. Here is the code package…
0
votes
1 answer

Changing color of TabHost/TabWidget

I'm having a really hard time changing the color of my TabWidget. I've looked at several posts and tried them out, but none of them worked for me. I'm trying to change the default (blue) color scene to green. Image of my app My xml…
Wilco
  • 53
  • 1
  • 6
0
votes
1 answer

Fragment containing tabhost and viewpager doesn't overlap the ListFragment

MyListFragment.java this extends ListFragment and onListItemClick() I need to migrate to another two Fragments which should be displayed over this ListFragment. I don't know how to solve this error I am stuck over for 3 days help me out. I don't…
0
votes
3 answers

ScrollView starts from tabbar, but needs to scroll from top of the layout

I have an issue over Scroll bar in my layout. My layout contains a scrollbar which contains two layouts. The first layout has static height. And the second latout contains tabHost for tabgroup. Second layout also contains Expandable Gridview. The…
Krishna R
  • 1
  • 2