Can't find the cause “you must specify a way to create the tab indicator”

后端 未结 1 477
青春惊慌失措
青春惊慌失措 2020-12-20 23:45

I am getting \"you must specify a way to create the tab indicator\" error(as per logcat). Can\'t find the reason.

Main class:

package org.tatvamoksh.         


        
相关标签:
1条回答
  • 2020-12-21 00:05

    change last tab code as :

    //Tab for Updates
        TabSpec u = tabHost.newTabSpec("Updates");
        u.setIndicator("Updates");
        Intent updatesIntent = new Intent(this, Updates.class);
        u.setContent(updatesIntent);
    

    because you are not setting Indicator and Content for TabSpec u (you are setting for m Tab)

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