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 7010777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:02:28+00:00 2026-05-27T22:02:28+00:00

Am very new to Android projects. Just i tried to work with TabHost controller

  • 0

Am very new to Android projects. Just i tried to work with TabHost controller in Android. I have got a code from this link, coderzheaven.com. But, in this code i received one error Syntax error, insert ";" to complete. Here is my code,

package tab.fragment;

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

    public class TabBarSample extends TabActivity 
    {
        @Override
        public void onCreate(Bundle savedInstanceState) 
        {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main);

            TabHost tabHost = (TabHost)findViewById(android.R.id.tabhost);

            TabSpec firstTabSpec = tabHost.newTabSpec("tab_id1");
            TabSpec secondTabSpec = tabHost.newTabSpec("tab_id2");
            TabSpec thirdTabSpec = tabHost.newTabSpec("tab_id3");

            firstTabSpec.setIndicator("Time").setContent(new Intent(this,Time.class));
            secondTabSpec.setIndicator("Date").setContent(new Intent(this,Date.class));
            thirdTabSpec.setIndicator("Option").setContent(new Intent(this,Option.class));

            tabHost.addTab(firstTabSpec);
            tabHost.addTab(secondTabSpec);
            tabHost.addTab(thirdTabSpec); //Here the error occuring..
        }
    }

How can i do this? Please help me. Thanks in advance.

  • 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-05-27T22:02:29+00:00Added an answer on May 27, 2026 at 10:02 pm

    Most likely it is not in fact the ; causing the problem, but a missing closing }

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been slowing learning and building my first android app. I'm VERY new
I am very new to Android programming, and I have read everywhere and I
i am very new to android and i am stuck here. i have a
I'm very new to programming in Android, but have been struggling all day with
Am very new to Android programming, so sorry if this is a simple problem.
I'm very new to Android development (just started today), and also very new to
I am very new to Android development, so I appologise in advance if this
OK, I am very new to Android and C#. Just started today in fact.
Ok, so I just recently got into this Android app development using Eclipse for
I am really very new on android development. I have made 2-3 apps ,

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.