tabhost

Issues with Android TabHost Example

I have been attempting to implement the 'advanced' tabwidget example from google. But, when it tries to call tabHost.addTab(spec); I get a stack trace from the debugger. Sorry, I don't have the stack trace here, but I'm wondering if others have had this same issue (as this code had a number of typo's and missing information that stoppe...

Issue with displaying TabHost Layout in new Intent

Dear Android folks, I am having an issue with using TabHost in a new Intent of type TabActivity which I hope you can point me in the right direction. Funnily it works fine when I try to view it in the original Intent : setContentView(R.layout.main) I get a "forced closed" and within logcat, I get the following error even though my Ta...

Problem running android HelloTabWidget example - NullPointerException on addTab()

I've tried the Tab Layout example, and I've also fixed the few typos in the example (and added all the activities to the manifest). However, when I run it on the emulator I get a NullPointerException on the first line that says tabHost.addTab(spec); So my question, of course, is. What is wrong with the example that would cause th...

Tab Layout tutorial incomplete?

Hi there, I've been trying to implement the tab UI described in this tutorial: http://developer.android.com/intl/de/resources/tutorials/views/hello-tabwidget.html I follow all the steps described in the process but I keep getting a runtime exception which I believe has something to do with the fact that nowhere in the tutorial I added t...

Android: TabHost with ListView of CheckBox's

I have a TabHost that contains 5 TabHost.TabSpec. Each TabSpec is a ListView that is populated using SimpleCursorAdapter, with the datasource being an sqlite3 database. The layout used by SimpleCursorAdapter contains 2 TextViews which hold database data (one hidden - which contains the database record _id, and one displayed). The 3rd ...

Background in tab widget ignore scaling

Hey, I tried to use a background (480x320) for my tab content. Using a xml as drawable, I should be able to scale the image. This works fine outside the tabhost/tabactivity. If I try to use it inside the tabcontent, the scaleType doesn't work. He ignores every scaleType I tried. tabcontent: <?xml version="1.0" encoding="utf-8"?> <Rela...

In an android app I would like to show a progress bar on a child tab until the webview loads. Any ideas?

Hi In an android app I am using a tabview for an app and one of the tabs shows a webview. But the page is blank until the web page loads. how would one show a progress bar until the page loads. It cannot be in the title bar because that is hidden by the tabhost ...

Start all tab's activities for pre-cache

I have a TabActivity with three tabs defined. The first tab is light-weight and renders in acceptable time. But the 2nd and 3rd tab, does need a couple of seconds to get visually rendered, after I click them. I would like to launch them, after I've loaded my first tab, in background for pre-cache. Once they are loaded, I can switch quick...

Android - iphone style tabhost

Is it possible to style the Android Tabhost to look like that of the iPhone? If not, is there any open source code that can show how to create Bottom Tabs for Andoid ? ...

Dynamic remove Tab from TabHost problem on android1.5

My codes like this: public void removeTabForLogout(){ if (tabHost.getTabWidget().getChildCount()==4){ tabHost.setCurrentTab(0); tabHost.clearAllTabs(); tabHost.addTab(getTab1()); tabHost.addTab(getTab2()); } } private TabSpec getTab1(){ if (mTab1==null){ mTab1= tabHost.newTabSpec("...

Strange options menu behavior in Android TabActivity

I have a TabActivity with four tabs (each is its own Activity). Each tab defines its own onCreateOptionsMenu (and in some cases, onPrepareOptionsMenu). When each tab is loaded, an AsyncTask is kicked off to retrieve the data needed to populate that tab's list. If I switch between tabs very quickly (while they're still loading) and then ...

WebView inside Tab hiding the tabWidgets

I'm having trouble with a WebView always filling the full screen and thus covering my tabs. Here is my code for the tabhost.. public class tabNZBMobile extends TabActivity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); Resources re...

TabHost remove all content activities

I have a code for populating content for tabs dynamically. First time it works ok, but when I want to replace tabs (and their content) with new content - tabs are changed but tabs' contents are not, how can I clear completely whole TabHost and replace with other content? TabHost tabHost = getTabHost(); Intent intent; TabHost.TabSpec spe...

How Can I control the nunmber of tabs raws inAndroid 1.5

Hi, I'd like to divide my tabs to 3 diffrent raws so each raw will have tabs of a similar activity( E.g. action games, board games, shooters games) How it can be done? Thanks, Eyal. ...

Automatically add "More..." Tab in Android

Hi, all I'm writing an application which contains many tabs, and sometimes the number of tabs may exceed five. So I want to make it behave like iPhone, which is, move additional tabs to a "More..." tab. I would like to know if this feature is supported by TabHost, or if there is any existing open source widget which can do the favor for...

Android: TabHost How To: set new content in existing tabs upon menu button?

Hello stackoverflow, I recently started Android programming and was working on my first program which displays a historic text document, sectioned by tabs via TabHost. I have limited my program to one activity and merely used setContent in my TabSpec's to switch between different XML views. The document has both unedited and corrected...

Android: stack management for views in a tab?

I see some answers here prefer views over activities as contents of tabs. Correct me if I am wrong. My understanding is that by switching out views, it's possible to keep the navigation flow inside a tab (more user friendly, I think). But I wonder how to manage the view stack then in case of the back button events. Also this could cause ...

Common bottom layout in all the tabs of TabHost in Android?

Hi, I have a TabHost with 4-5 tabs. I want to have a similar bottom for all the tabs. Is there any way we can add a bottom to all the tabs? Or do I need to place the xml code in every layout file. Please let me know if any one has the solution. Regards Sunil ...

ListView items not responding to tap

I'm just getting my feet wet with Android and have built a UI that contains a TabHost with three tabs. Each tab is powered by its own Activity. The first Tab contains a listview with a prepopulated set of rows and is built from a custom ArrayAdapter. The problem I'm running into is that none of the ListView rows are tappable. In ot...

Modify tab indicator dynamically in Android

My application needs to update tab indicator dynamically, I'm trying to do this by invoke TabSpec.setIndicator(), but it doesn't work. Here is my code: In onCreate method of TabActivity: tabHost = getTabHost(); TabSpec tabSpec = tabHost.newTabSpec("abc"); tabSpec.setIndicator("helloabc"); tabSpec.setContent(new MyViewFactory()); tabHo...