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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T19:17:00+00:00 2026-06-08T19:17:00+00:00

I am currently having problems with a scrollable view within a tab on an

  • 0

I am currently having problems with a scrollable view within a tab on an android layout. The view scrolls past underneath the tabs without a scrollable view implemented in the tab layout as shown below.

http://i46.tinypic.com/2ccmp0w.png

When I place a scrollable view within the tabbed layout it shows a small scrollable view that appears buggy and unusable. Shown below.

http://tinypic.com/r/29ej2ft/6

The code for the tab host is below

<?xml version="1.0" encoding="utf-8"?>
<TabHost
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<RelativeLayout
    android:layout_height="fill_parent"
    android:layout_width="fill_parent">
    <FrameLayout
        android:id="@android:id/tabcontent"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_alignParentTop="true"
        android:padding="5dp" />
    <TabWidget
        android:id="@android:id/tabs"
        android:layout_alignParentBottom="true"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" />        
</RelativeLayout>
</TabHost>

and this is the code for the tab with the scroll view implemented

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" 
android:id="@+id/todayScroll" 
android:layout_height="wrap_content"
android:layout_width="fill_parent" >

<LinearLayout 
    android:layout_height="wrap_content"
    android:layout_width="fill_parent"      
    android:orientation="vertical" >

            <ExpandableListView
                android:id="@+id/ExpList"
                android:layout_height="match_parent"
                android:layout_width="match_parent"
                android:groupIndicator="@null" />   

</LinearLayout>
</ScrollView>

Any ideas of how to get the content to scroll correctly and not get in the way of the tabs would be greatly appreciated 🙂 Thanks.

I’ve tried a fair few times but it’s starting to get very frustrating.

EDIT:
Here is the TabHostActivity file.

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

    TabHost tabHost = getTabHost();

    // Tab for todays meals
    TabSpec todaysSpec = tabHost.newTabSpec("Todays");
    //you could set icon here as well as title
    todaysSpec.setIndicator("Todays");
    Intent todaysIntent = new Intent(this, TodaysMealsActivity.class);
    todaysSpec.setContent(todaysIntent);

    // Tab for future meals
    TabSpec futureSpec = tabHost.newTabSpec("Future");
    futureSpec.setIndicator("Future");
    Intent futureIntent = new Intent(this, FutureMealsActivity.class);
    futureSpec.setContent(futureIntent);

    // Tab for comments
    TabSpec commentsSpec = tabHost.newTabSpec("Comments");
    commentsSpec.setIndicator("Feedback");
    Intent commentsIntent = new Intent(this, CommentsActivity.class);
    commentsSpec.setContent(commentsIntent);

    // Adding all TabSpec to TabHost
    tabHost.addTab(todaysSpec); // Adding todays tab
    tabHost.addTab(futureSpec); // Adding future tab
    tabHost.addTab(commentsSpec); // Adding comments tab
}
}

Cheers,
Rmplanner

  • 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-08T19:17:01+00:00Added an answer on June 8, 2026 at 7:17 pm

    Edit from comments: An alternate solution (the one used by the OP) was found here.

    Use android:layout_height="fill_parent" on your ScrollView. (Or, since fill_parent is deprecated, use android:layout_height="match_parent".)

    First, remove your ScrollView, and replace your RelativeLayout with this:

    <RelativeLayout
        android:layout_height="fill_parent"
        android:layout_width="fill_parent">
    
        <FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_above="@android:id/tabs"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:padding="5dp" />
    
        <TabWidget
            android:id="@android:id/tabs"
            android:layout_alignParentBottom="true"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" />
    
    </RelativeLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

it's me once more, having problems with sqlite for Android I currently get a
I am currently having problems calling a stored procedure async from within a insert-update-trigger.
I'm currently having problems to execute a command from a shell variable. In general
I am currently having problems with attempting to style the HTML rich text editor
Currently having some problems- now = datetime.datetime.now() month = now.strftime(%B) site = wikipedia.getSite('en', 'wikiquote')
Currently i am having some problems with getting some data out of a DataTable
I am currently making a facebook app and am having some problems with permissions.
I'm trying to build firefox but I'm having some problems. I currently have Visual
Hi I am currently having a problem with parsing an Xml string without any
I'm currently having problems with the reintegrate branch option in cornerstone. I'm getting an

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.