TabHost Remove Tab problem

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

TabHost Remove Tab problem

Postby prajkti.khadse » Wed Sep 02, 2009 10:47 am

Hello All,

In my application, i am creating Tabs Programmatically and and i want to remove them as well one by one.
I tried removeViewAt() and it works too.

But, after deleting my application gets crashed.
e.g. If i have three tabs Tab1, Tab2 and Tab3 and if i remove Tab2, it gets removed but as soon as i click either of the tabs Tab1 or Tab2, the application gets crashed and on Log Cat i see this Error Message :

AndroidRuntime(766): Uncaught handler: thread main exiting due to uncaught exception
AndroidRuntime(766): java.lang.NullPointerException
AndroidRuntime(766): at android.widget.TabWidget.onFocusChange(TabWidget.java:241)
AndroidRuntime(766): at android.view.View.onFocusChanged(View.java:2382)

...
AndroidRuntime(766): at android.view.ViewGroup.removeViewInternal(ViewGroup.java:2016)
AndroidRuntime(766): at android.view.ViewGroup.removeViewAt(ViewGroup.java:1970)

can anyone please please Help me? :oops:
prajkti.khadse
Developer
Developer
 
Posts: 32
Joined: Thu Mar 19, 2009 1:01 pm
Location: Bangalore

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 7 guests