Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9227621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:07:30+00:00 2026-06-18T05:07:30+00:00

I am getting you must specify a way to create the tab indicator error(as

  • 0

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.tml;


import android.app.TabActivity; 
import android.content.Intent;
import android.os.Bundle;
import android.view.Window;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

@SuppressWarnings({ "deprecation" })
public class MainActivity extends TabActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    //Remove title bar
    this.requestWindowFeature(Window.FEATURE_NO_TITLE);

    setContentView(R.layout.activity_main);

    TabHost tabHost = getTabHost();

    // Tab for Tatva
    TabSpec t = tabHost.newTabSpec("Tatva");
    // setting Title and Icon for the Tab
    t.setIndicator("Tatva");
    Intent tatvaIntent = new Intent(this, TatvaActivity.class);
    t.setContent(tatvaIntent);

    // Tab for Moksh
    TabSpec m = tabHost.newTabSpec("Moksh");
    m.setIndicator("Moksh");
    Intent mokshIntent = new Intent(this, MokshActivity.class);
    m.setContent(mokshIntent);

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

    // Adding all TabSpec to TabHost
    tabHost.addTab(t); // Adding Tatva tab
    tabHost.addTab(m); // Adding Moksh tab
    tabHost.addTab(u); // Adding Updates tab
}
}

layout file:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >

<TabHost
android:id="@android:id/tabhost"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >

    <LinearLayout
   android:layout_width="match_parent"
   android:layout_height="match_parent"
   android:orientation="vertical" >

        <TabWidget
       android:id="@android:id/tabs"
       android:layout_width="match_parent"
       android:layout_height="wrap_content" />

        <FrameLayout
        android:id="@android:id/tabcontent"
        android:layout_width="match_parent"
        android:layout_height="match_parent" >

            <ListView
            android:id="@android:id/list"
            android:layout_width="match_parent"
            android:layout_height="match_parent" >
            </ListView>
        </FrameLayout>
    </LinearLayout>
</TabHost>
</RelativeLayout>

Commenting out the following code fixes it.

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

I can’t guess the exact problem. Would be grateful for any guidance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T05:07:31+00:00Added an answer on June 18, 2026 at 5:07 am

    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
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting an error for this content template within a style: Must specify both
I am getting an error message expression must have constant value when initializing an
I am getting java.sql.SQLException: error occurred during batching: batch must be either executed or
I am getting an error _reverse_with_prefix() argument after * must be a sequence, not
I'm getting the following error: Fatal error: Declaration of Shoppingcart::addToCart() must be compatible with
I'm getting a nonsensical error message: The element type manifest must be terminaed by
I'm probably getting mad about it and there must be some trivial error in
I keep getting this error in Matlab: Attempted to access r(0,0); index must be
Okay this is werid, i keep getting the error, randomly. ValueError: matrix must be
I'm getting this error: Must declare the scalar variable @TempTable1. The query works if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.