Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to clear the Tabs in a TabHost of Android?
    primarykey
    data
    text
    <p>I have been trying to reset the tabs in a Tabhost of Android platform and every time I try to do I get some issue or other. </p> <p>Below is the code which I use:</p> <pre><code> if(reset) { tabHost.setCurrentTab(0); //tabHost.clearAllTabs(); tabHost.getTabWidget().removeAllViews(); } </code></pre> <p>I get the following exception: </p> <blockquote> <p>e01-06 07:31:48.287: WARN/System.err(1581): android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. 01-06 07:31:48.287: WARN/System.err(1581): at android.view.ViewRoot.checkThread(ViewRoot.java:2683) 01-06 07:31:48.287: WARN/System.err(1581): at android.view.ViewRoot.requestLayout(ViewRoot.java:557) 01-06 07:31:48.287: WARN/System.err(1581): at android.view.View.requestLayout(View.java:7918) 01-06 07:31:48.287: WARN/System.err(1581): at android.view.View.requestLayout(View.java:7918) 01-06 07:31:48.287: WARN/System.err(1581): at android.view.View.requestLayout(View.java:7918) 01-06 07:31:48.287: WARN/System.err(1581): at android.view.View.requestLayout(View.java:7918) 01-06 07:31:48.287: WARN/System.err(1581): at android.view.View.requestLayout(View.java:7918) 01-06 07:31:48.287: WARN/System.err(1581): at android.view.ViewGroup.removeAllViews(ViewGroup.java:2146) 01-06 07:31:48.287: WARN/System.err(1581): at com.t.android.m.setupTabs(CAndroidUI.java:97) 01-06 07:31:48.287: WARN/System.err(1581): at com.t.android.m.DoRegistrationNotification(CAndroidUI.java:175) 01-06 07:31:48.287: WARN/System.err(1581): at com.t.android.m.Handler$2.handleQchatServiceEvent(QServiceHandler.java:236) 01-06 07:31:48.287: WARN/System.err(1581): at com.t.android.m.LStub.onTransact(ServiceCallback.java:62) 01-06 07:31:48.287: WARN/System.err(1581): at android.os.Binder.execTransact(Binder.java:287) 01-06 07:31:48.287: WARN/System.err(1581): at dalvik.system.NativeStart.run(Native Method)</p> </blockquote> <p>Could some one give me a clue on what's happening?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload