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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:55:16+00:00 2026-05-28T16:55:16+00:00

I am using a tablayout nested inside a dialog that I use for a

  • 0

I am using a tablayout nested inside a dialog that I use for a menu in my app. It works fine on all other devices except the galaxy tab 10.1 on which it just comes up empty. Theres not one single error, warning, or mention of such in the logcat or anywhere and I dont see anything coming up null when trying to debug. Anyone have any ideas on what could be the problem with this specific device and a tablayout nested in a dialog? Should I just move the whole tablayout menu into its own activity/subactivity?

Heres what I am doing with the code…..its nothing to crazy:

dialog.setContentView(R.layout.maintabmenu);
final TabHost tabs = (TabHost) dialog.findViewById(R.id.my_tabhost);
tabs.setup();
tabs.setCurrentTab(0);
TabSpec tspec11 = tabs.newTabSpec("New Tab");
    tspec11.setIndicator("User");

tspec11.setContent(R.id.ScrollView01);
tabs.addTab(tspec11);

TabSpec tspec2 = tabs.newTabSpec("New Tab");
tspec2.setIndicator("Settings");

tspec2.setContent(R.id.ScrollView02);
tabs.addTab(tspec2);

TabSpec tspec3 = tabs.newTabSpec("New Tab");
tspec3.setIndicator("My options");
tspec3.setContent(R.id.ScrollView03);
tabs.addTab(tspec3);                 

and heres the xml:

<?xml version="1.0" encoding="utf-8"?>


<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/my_tabhost"
android:layout_width="match_parent"
android:layout_height="match_parent" >

<LinearLayout
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:padding="5dp">
    <TabWidget
        android:id="@android:id/tabs"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>
   <FrameLayout
        android:id="@android:id/tabcontent"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:padding="5dp">

           <ScrollView android:id="@+id/ScrollView01"
              android:layout_width="match_parent"
              android:layout_height="match_parent">

              <RelativeLayout 
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bggreydotted"
android:orientation="vertical" >

<TextView
    android:id="@+id/usersname"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentTop="true"
    android:layout_centerHorizontal="true"
    android:text="User Info" />

<ImageView
    android:id="@+id/profileimage2"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true"
    android:layout_centerInParent="true"
    android:layout_centerVertical="true"
    android:src="@drawable/favicon_yellow_g_metal_bg2" />


<ImageButton
    android:id="@+id/drawMark"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentRight="true"
    android:layout_below="@+id/createMarks"
    android:background="@null"

    android:src="@drawable/graffitbuttondrawmark" />

<ImageButton
    android:id="@+id/zmLevel"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
   android:layout_alignParentLeft="true"
   android:layout_below="@+id/search"
    android:background="@null"

    android:src="@drawable/graffitbuttonzoomlevel" />

<ImageButton
    android:id="@+id/license"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentRight="true" 
    android:layout_below="@+id/mypreferences"
    android:background="@null"
    android:src="@drawable/graffitbuttonlicense" />

<ImageButton
    android:id="@+id/mapView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@+id/zmLevel"
    android:layout_alignParentLeft="true"
    android:background="@null" 
    android:src="@drawable/graffitbuttonmapview" />

<ImageButton
    android:id="@+id/mypreferences"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentRight="true"
    android:layout_below="@+id/drawMark"
    android:background="@null"

    android:src="@drawable/graffitbuttonuserpreference" />

<ImageButton
    android:id="@+id/search"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_below="@+id/marksNearMe"
    android:background="@null"

    android:src="@drawable/graffitbuttonmarksearch" />

<ImageButton
    android:id="@+id/createMarks"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="@null"
     android:layout_alignParentTop="true"
    android:layout_alignParentRight="true"
    android:src="@drawable/graffitbuttonuploadphoto" />

<ImageButton
    android:id="@+id/marksNearMe"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="@null"
     android:layout_alignParentLeft="true"
     android:layout_alignParentTop="true"
    android:src="@drawable/graffitbuttonmarksnearme" />

</RelativeLayout>

            </ScrollView>

            <ScrollView android:id="@+id/ScrollView02"
               android:layout_width="match_parent"
android:layout_height="match_parent">

               <TextView 
                   android:id="@+id/TextView02"
                   android:text="wizard"
                   android:layout_width="wrap_content" 
                   android:layout_height="wrap_content"
                   android:gravity="center_horizontal"
                   android:paddingLeft="15dip"
                   android:paddingTop="15dip"
                   android:paddingRight="20dip"
                   android:paddingBottom="15dip"/>

            </ScrollView>

            <ScrollView android:id="@+id/ScrollView03"
              android:layout_width="match_parent"
android:layout_height="match_parent">

               <RelativeLayout 
android:layout_width="match_parent"
android:layout_height="300dip"
android:background="@drawable/bggreydotted"
android:orientation="vertical" >


<TextView
    android:id="@+id/userinfo"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true"
    android:text="USER INFO" />

<ImageView
    android:id="@+id/profileimage"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true"
    android:layout_centerInParent="true"
    android:layout_centerVertical="true"
    android:src="@drawable/favicon_yellow_g_metal_bg2" />

<ImageButton
    android:id="@+id/sky"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true" 
    android:layout_below="@+id/mymarks"
    android:background="@null"
    android:src="@drawable/graffitbuttonsky" />

<ImageButton
    android:id="@+id/myclicks"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_alignParentTop="true"
    android:background="@null"
    android:src="@drawable/graffitbuttonmyclicks" />

<ImageButton
    android:id="@+id/mygallery"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_below="@+id/myclicks"
    android:background="@null"
    android:src="@drawable/graffitbuttonmygallery" />

<ImageButton
    android:id="@+id/mymarks"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_below="@+id/mygallery"
    android:background="@null"
    android:src="@drawable/graffitbuttonmymarks" />

<ImageButton
    android:id="@+id/help"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentRight="true" 
    android:layout_below="@+id/createuser"
    android:background="@null"
    android:src="@drawable/graffitbuttonhelp" />

<ImageButton
    android:id="@+id/createuser"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentRight="true" 
    android:layout_below="@+id/logout"
    android:background="@null"
    android:src="@drawable/graffitbuttoncreateuser" />

<ImageButton
    android:id="@+id/login"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentTop="true"
    android:layout_alignParentRight="true"
    android:background="@null"
    android:src="@drawable/graffitbuttonlogin3" />

<ImageButton
    android:id="@+id/logout"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentRight="true"
    android:layout_below="@+id/login"
    android:background="@null"
    android:src="@drawable/graffitbuttonlogout" />

</RelativeLayout>

            </ScrollView>

    </FrameLayout>
</LinearLayout>

</TabHost>
  • 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-28T16:55:17+00:00Added an answer on May 28, 2026 at 4:55 pm

    I have figured it out 🙂

    For my case I had to make my xml layout like this:

    <?xml version="1.0" encoding="utf-8"?>
    
    
    <TabHost xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/my_tabhost"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >
    
    <LinearLayout
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <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="fill_parent"
            android:layout_height="fill_parent">
    
    
    
                  <RelativeLayout 
                      android:id="@+id/rlone"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/bggreydotted"
    android:orientation="vertical" >
    
    <TextView
        android:id="@+id/usersname"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:text="User Info" />
    
    <ImageView
        android:id="@+id/profileimage2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_centerInParent="true"
        android:layout_centerVertical="true"
        android:src="@drawable/favicon_yellow_g_metal_bg2" />
    
    
    <ImageButton
        android:id="@+id/drawMark"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_below="@+id/createMarks"
        android:background="@null"
    
        android:src="@drawable/graffitbuttondrawmark" />
    
    <ImageButton
        android:id="@+id/zmLevel"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
       android:layout_alignParentLeft="true"
       android:layout_below="@+id/search"
        android:background="@null"
    
        android:src="@drawable/graffitbuttonzoomlevel" />
    
    <ImageButton
        android:id="@+id/license"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true" 
        android:layout_below="@+id/mypreferences"
        android:background="@null"
        android:src="@drawable/graffitbuttonlicense" />
    
    <ImageButton
        android:id="@+id/mapView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/zmLevel"
        android:layout_alignParentLeft="true"
        android:background="@null" 
        android:src="@drawable/graffitbuttonmapview" />
    
    <ImageButton
        android:id="@+id/mypreferences"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_below="@+id/drawMark"
        android:background="@null"
    
        android:src="@drawable/graffitbuttonuserpreference" />
    
    <ImageButton
        android:id="@+id/search"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_below="@+id/marksNearMe"
        android:background="@null"
    
        android:src="@drawable/graffitbuttonmarksearch" />
    
    <ImageButton
        android:id="@+id/createMarks"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@null"
         android:layout_alignParentTop="true"
        android:layout_alignParentRight="true"
        android:src="@drawable/graffitbuttonuploadphoto" />
    
    <ImageButton
        android:id="@+id/marksNearMe"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@null"
         android:layout_alignParentLeft="true"
         android:layout_alignParentTop="true"
        android:src="@drawable/graffitbuttonmarksnearme" />
    
    </RelativeLayout>
    
    
                   <RelativeLayout 
                       android:id="@+id/rltwo"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/bggreydotted"
    android:orientation="vertical" >
    
    
    <TextView
        android:id="@+id/userinfo"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:text="USER INFO" />
    
    <ImageView
        android:id="@+id/profileimage"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_centerInParent="true"
        android:layout_centerVertical="true"
        android:src="@drawable/favicon_yellow_g_metal_bg2" />
    
    <ImageButton
        android:id="@+id/sky"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true" 
        android:layout_below="@+id/mymarks"
        android:background="@null"
        android:src="@drawable/graffitbuttonsky" />
    
    <ImageButton
        android:id="@+id/myclicks"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:background="@null"
        android:src="@drawable/graffitbuttonmyclicks" />
    
    <ImageButton
        android:id="@+id/mygallery"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_below="@+id/myclicks"
        android:background="@null"
        android:src="@drawable/graffitbuttonmygallery" />
    
    <ImageButton
        android:id="@+id/mymarks"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_below="@+id/mygallery"
        android:background="@null"
        android:src="@drawable/graffitbuttonmymarks" />
    
    <ImageButton
        android:id="@+id/help"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true" 
        android:layout_below="@+id/createuser"
        android:background="@null"
        android:src="@drawable/graffitbuttonhelp" />
    
    <ImageButton
        android:id="@+id/createuser"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true" 
        android:layout_below="@+id/logout"
        android:background="@null"
        android:src="@drawable/graffitbuttoncreateuser" />
    
    <ImageButton
        android:id="@+id/login"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_alignParentRight="true"
        android:background="@null"
        android:src="@drawable/graffitbuttonlogin3" />
    
    <ImageButton
        android:id="@+id/logout"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_below="@+id/login"
        android:background="@null"
        android:src="@drawable/graffitbuttonlogout" />
    
    </RelativeLayout>
    
    
    
        </FrameLayout>
    </LinearLayout>
    

    The difference in layout code is that removed the padding and changed the TabWidget layoutHeight to wrap_content. I think thats why it was comming up blank.

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

Sidebar

Related Questions

I'm using a TabLayout and I have custom images for the tabs that I
Using PyObjC , you can use Python to write Cocoa applications for OS X.
Using ASP.NET MVC there are situations (such as form submission) that may require a
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
I'm trying to implement a menu in the footer of an app, similar to
I am creating an application using TabLayout and am having problems with the display
I stack with this, I'm trying to create application using TabLayout. I have 3
Hi all I have created layout using following code <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android
I'm trying to create a chess game board with 8x8 buttons. I'm using nested
I have a tab layout app that needs to download a few files right

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.