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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:37:07+00:00 2026-06-05T13:37:07+00:00

I am creating a tabbed application for which i was testing out a google’s

  • 0

I am creating a tabbed application for which i was testing out a google’s tutorial on tab layout .
I am able to successfully run the hellotabwidget in the emulator , but when i am viewing the main.xml file in graphical layout editor of eclipse , it doesn’t show the tabs , and it’s content . It just shows some sort of

And thus I am not able to use the graphical editor to add buttons , or other things into the created tabs because i can’t view them in the graphical editor.

Can anyone help regarding this .

  • 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-05T13:37:09+00:00Added an answer on June 5, 2026 at 1:37 pm

    As per you Comments on this questions you’re misunderstood about the TabHost Here, i provide you some explanations.

    TabHost

    Container for a tabbed window view. This object holds two children: a set of tab labels that the user clicks to select a specific tab, and a FrameLayout object that displays the contents of that page. The individual elements are typically controlled using this container object, rather than setting values on the child elements themselves.

    Tab Widget

    Displays a list of tab labels representing each page in the parent’s tab collection. The container object for this widget is TabHost. When the user selects a tab, this object sends a message to the parent container, TabHost, to tell it to switch the displayed page. You typically won’t use many methods directly on this object. The container TabHost is used to add labels, add the callback handler, and manage callbacks. You might call this object to iterate the list of tabs, or to tweak the layout of the tab list, but most methods should be called on the containing TabHost object.


    And, the important thing is below image is TabWidget and, you can’t drag & drop any button there for making tabs directly.

    Image

    The Exclamatory symbol is not an error. That’s the symbol of tabwidget. Have a look at below code –

    public class AndroidTabLayoutActivity extends TabActivity {
        /** Called when the activity is first created. */
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main);
    
            TabHost tabHost = getTabHost();
    
            // Tab for Photos
            TabSpec photospec = tabHost.newTabSpec("Photos");
            // setting Title and Icon for the Tab
            photospec.setIndicator("Photos", getResources().getDrawable(R.drawable.icon_photos_tab));
            Intent photosIntent = new Intent(this, PhotosActivity.class);
            photospec.setContent(photosIntent);
    
            // Tab for Songs
            TabSpec songspec = tabHost.newTabSpec("Songs");
            songspec.setIndicator("Songs", getResources().getDrawable(R.drawable.icon_songs_tab));
            Intent songsIntent = new Intent(this, SongsActivity.class);
            songspec.setContent(songsIntent);
    
            // Tab for Videos
            TabSpec videospec = tabHost.newTabSpec("Videos");
            videospec.setIndicator("Videos", getResources().getDrawable(R.drawable.icon_videos_tab));
            Intent videosIntent = new Intent(this, VideosActivity.class);
            videospec.setContent(videosIntent);
    
            // Adding all TabSpec to TabHost
            tabHost.addTab(photospec); // Adding photos tab
            tabHost.addTab(songspec); // Adding songs tab
            tabHost.addTab(videospec); // Adding videos tab
        }
    }
    

    From, the comments lines you can understand how can we create the tabs. By extending of TabActivity for your activity only you can use Above code.

    Have a look at this Basic Example

    Hope these explanations will helps you.

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

Sidebar

Related Questions

So following http://www.techotopia.com/index.php/Creating_an_Interactive_iOS_4_iPhone_App , I'm doing the tutorial in a tabbed application template which
I have a tabbed application where I want the user to be able to
I am creating a tabbed pane for the amount of rooms that I have
I've created a fiddle to demonstrate my issue: http://jsfiddle.net/motocomdigital/QyhpX/5/ OVERVIEW I'm creating a tabbed
Basically I have a tabbed Panel I'm creating. When the user click on a
I am creating a calendar list system, that has tabbed dates on top, with
Creating a google map with store locations within 50 miles of user entered address.
I am creating a tabbed content interface. The content panels are an unordered list
I'm creating android app that has table layout for the main activity, and that
I have a MVC 3 Razor web application that needs to allow creating and

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.