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

  • SEARCH
  • Home
  • 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 8086265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:23:41+00:00 2026-06-05T18:23:41+00:00

I have a TabbedView Activity with 3 tabs. Currently, only the 1st tab has

  • 0

I have a TabbedView Activity with 3 tabs. Currently, only the 1st tab has its correct icon, and the other 2 are blank.

My xml file is as follows:

<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/news" android:state_selected="true" />
<item android:drawable="@drawable/score" android:state_selected="true" />
<item android:drawable="@drawable/schedule" android:state_selected="true" />
</selector>

The news icon is the one that shows up. Here is my tabbed view activity. I was expecting to see the 2nd tab icon be the score icon, and the 3rd tab be the schedule Icon:

        //Headlines
    intent = new Intent().setClass(this, HeadlineBoard.class);
    intent.putExtra(Constants.SPORT_NAME_EXTRA, sportsName);
    intent.putExtra(Constants.HEADLINES_FOR_SPORT_EXTRA, headlines);
    spec = tabHost.newTabSpec("news").setIndicator("Headlines",
                      res.getDrawable(R.drawable.hl_aggie))
                  .setContent(intent);
    tabHost.addTab(spec);

    //Scores
    intent = new Intent().setClass(this, ScoreBoard.class);
    intent.putExtra(Constants.SPORT_NAME_EXTRA, sportsName);
    intent.putExtra(Constants.SCORES_FOR_SPORT_EXTRA, scores);
    spec = tabHost.newTabSpec("score").setIndicator("Scores",       
                      res.getDrawable(R.drawable.hl_aggie))
                  .setContent(intent);
    tabHost.addTab(spec);

    //Schedule
    intent = new Intent().setClass(this, ScheduleBoard.class);
    intent.putExtra(Constants.SPORT_NAME_EXTRA, sportsName);
    intent.putExtra(Constants.SCHEDULE_FOR_SPORT_EXTRA, scheduleIn);
    spec = tabHost.newTabSpec("schedule").setIndicator("Schedule",
                      res.getDrawable(R.drawable.hl_aggie))
                  .setContent(intent);
    tabHost.addTab(spec);       
    tabHost.setCurrentTab(0);
  • 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-05T18:23:43+00:00Added an answer on June 5, 2026 at 6:23 pm

    if you just want all the icon to show up, why don’t you just set all the icon drawables respectively to each tab ?

    TabSpec scoreSpec= tabHost.newTabSpec("score");

    scoreSpec.setIndicator("scores", getResources().getDrawable(R.drawable.score));

    Here is the Reference..

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

Sidebar

Related Questions

i have a project with 3 tabs, first tab have tableview with navigation, i
I have a tableview contains xml parsed objects. I want to implement activity indicator
I have a tabbed view with one Activity per tab, and when I switch
I have a set of EditText widgets on my activity view, each on a
I have an Android activity that displays a list of log entries (using a
i have a tableview which has image and a text behind, i create the
I currently have a UIActivityIndicator appearing on screen for a second or two. I
I have a UISearchDisplayController that I am currently regretting implementing. The problem is that
My activity uses a TableView layout and I have it coded to set the
I have a tableView that needs to be updated after information has been inserted

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.