Tabhost error in getting in to my activity

后端 未结 1 1073
悲&欢浪女
悲&欢浪女 2021-01-29 09:17

When I am trying to get the tab host in my activity it is showing the error that do you forget to call public void setup(LocalActivityManager activityGroup)?

<
1条回答
  •  一向
    一向 (楼主)
    2021-01-29 09:47

    You are trying to use tabhost.For that you must extend TabActivity.

    OR

    Write the below code in onCreate():

    LocalActivityManager mlam = new LocalActivityManager(this, false);
            mlam.dispatchCreate(savedInstanceState);
            // tabHost = getTabHost();
            //tabHost.setup();
            tabHost.setup(mlam); 
    

    0 讨论(0)
提交回复
热议问题