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(
AndroidRuntime(766): at android.view.View.onFocusChanged(

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

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


Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 3 guests