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 tabwidget each tab text

I have tabview like below, I want to change text all caps to: Purchases Recharge Amount and also want to size to text. How can I do it?
Vishwanath.M
  • 6,235
  • 11
  • 42
  • 56
0
votes
2 answers

Android TabHost not working. I haven't done any mistake

I have created an app to show TabHost. But when i launch the application on Emulator it closes by saying App Unfortunately Closed. I searched internet but can't find any solution. My code is activity_main.xml
0
votes
1 answer

Android 5.0 Tabhost action bar?

I'd like to have an actionbar (including a menu) with below some tabs like this: How is this possible? I know Tabhost is decapricated, but I can't find a suitable alternative..
0846277
  • 73
  • 3
  • 11
0
votes
1 answer

Android OnTabChangingListener

The TabHost widget has a setOnTabChangedListener() method to run code when the tab changes, but I need to run code before the tab changes, in order to validate the data entered. Is this possible? I was thinking about using a click listener but it…
Echilon
  • 10,064
  • 33
  • 131
  • 217
0
votes
1 answer

Android : ListView onClick event in the tabs

I'm just a newbie in Android world. I tried to add a ListView inside a tab (or actually in activity), and each listview will be displaying another view that contains component such text, image and etc. this components is got to be dynamic, will be…
Aru
  • 1
  • 1
0
votes
1 answer

Android on TabHost little more depth of the problem, there is the hard return key on the treatment

I have a question on the Android Activity, for example I have a TabHost, and there are included four Activities, the first tab is a search Activity, enter a keyword in the current result of this Activity to return, and in the current Activity…
Enrico
  • 1
0
votes
2 answers

Switch back to previously selected tab after the activity is recreated

In my TabActivity the user may be asked to switch to browser activity for OAuth phase, and if the phase takes too much time, my activity will be killed. After the user switches back to my activity, its onCreate() method is invoked again and tabs are…
ZelluX
  • 69,107
  • 19
  • 71
  • 104
0
votes
1 answer

Android TabHost with ActionBar . Difference Action for different tabs

Getting error on TabSpec. I have implement to ActionBar.TabListener in MainActivity. First mycode is working without ActionBar but I need ActionBar to perform different activity. Eg. If home tab it will have search option on ActionBar. In next tab…
89030943809
  • 157
  • 1
  • 1
  • 16
0
votes
1 answer

android: add empty tab first and set content later

In the example below, is there a way to add an empty tab first and set the content later when args value is not null? public class MainActivity extends FragmentActivity { private FragmentTabHost mTabHost; @Override protected void onCreate(Bundle…
Sammys
  • 1,443
  • 5
  • 14
  • 21
0
votes
1 answer

can't switch between tabhost with google map inside

I used a tabhost for two fragments. Each fragment contains a google map.The question is it performs well in each fragment, but when I switch back the same fragment it crushed. This is the error messages: 05-10 14:40:02.438 …
0
votes
1 answer

Android: TabHost

I have a question in regards to http://developer.android.com/resources/tutorials/views/hello-tabwidget.html Lots of issues are already discussed but this example only works for me if I in the onCreate() method do NOT use…
paradroid666
  • 553
  • 2
  • 6
  • 8
0
votes
2 answers

Android: NavigationDrawer vs. Tabbed Bar

I'm developing an android app and i want to ask from a user-friendly perspective: Using NavigationDrawer or Using Tabbed View (TabHost i think) Which one is more user-friendly. Note: I'm not an android user.
ANA
  • 282
  • 2
  • 16
0
votes
1 answer

Android - Change fragment in a pager that in a tab by a click

I got a ViewPager inside a TabHost with this adapter: @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(R.layout.fragment_home, container, false); …
CodeMonkey
  • 11,196
  • 30
  • 112
  • 203
0
votes
1 answer

tabhost along with tabs goes when navigation drawer pulled

I have a navigation drawer with swipe views and tab navigation. My problem is that when navigation drawer is pulled tabs are gone and when i swipe project stops unexpectedly. Below is the logcat here is where studio points the error. …
0
votes
1 answer

Is it better to create Navigation Tab using FragmentTabHost or SlidingTabLayout?

Tutorial found in Android Developer can't be used together with Toolbar and Android 5.0. The alternative solution is to use SlidingTabLayout. But currently, I found FragmentTabHost. Which method is better? What is the pros and cons for each of them?…
stackex
  • 3,205
  • 1
  • 11
  • 16