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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T14:00:22+00:00 2026-05-24T14:00:22+00:00

I have a FrameLayout which has a ScrollView as the only child. During runtime

  • 0

I have a FrameLayout which has a ScrollView as the only child. During runtime I inflate a RelativeLayout which has a ScrollView within and add it to the FrameLayout (This child view now overlaps the previous ScrollView). I have used a LockableScrollView as the first child of the FrameLayout so, I can disable it’s scrolling by setting the scrollable property to false, the focusable and clickable properties are also set to false after the new child is added to the FrameLayout. But still I’m unable to scroll the new ScrollView. Any pointers?

The following is the Root layout.

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

    <RelativeLayout
        android:id="@+id/relative_layout"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:background="@drawable/questions_bg">

        <ImageView
            android:id="@+id/questions_header"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:scaleType="fitXY"
            android:src="@drawable/header_bg" />

        <com.package.ui.LockableScrollView
            android:id="@+id/question_scrollview"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_below="@id/questions_header"
            android:scrollbarAlwaysDrawVerticalTrack="true"
            android:scrollbarStyle="insideOverlay"
            android:scrollbarFadeDuration="0"
            android:fillViewport="true">

            <!-- Some more views -->

        </com.package.ui.LockableScrollView>    
    </RelativeLayout>
</FrameLayout>

The following is the child layout that is inflated during runtime and added to the FrameLayout.

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom|center_horizontal"
    android:layout_marginBottom="20dp">

    <ImageView
        android:id="@+id/q_map_header"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:src="@drawable/en_question_map_header" />

    <ImageView
        android:id="@+id/q_map_bg"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_below="@id/q_map_header"
        android:src="@drawable/question_map_content" />

    <ImageView
        android:id="@+id/q_map_footer"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_below="@id/q_map_bg"
        android:paddingBottom="50dp"
        android:src="@drawable/en_question_map_footer" />

    <ScrollView
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_below="@id/q_map_header"
        android:layout_above="@id/q_map_footer"
        android:layout_marginLeft="28dp"
        android:layout_marginRight="30dp"
        android:layout_marginTop="14dp"
        android:layout_marginBottom="14dp"
        android:layout_alignLeft="@id/q_map_header"
        android:layout_alignRight="@id/q_map_header"
        android:fillViewport="true" >

        <GridView
            android:id="@+id/q_map_grid"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:numColumns="5"
            android:verticalSpacing="8dp"
            android:horizontalSpacing="8dp"
            android:stretchMode="columnWidth"
            android:gravity="center_horizontal" />
    </ScrollView>
</RelativeLayout>
  • 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-24T14:00:24+00:00Added an answer on May 24, 2026 at 2:00 pm

    You can’t place a scrollable container (Here GridView) within another scrollable container (Here ScrollView).

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

Sidebar

Related Questions

I have a FrameLayout view which contains one (MapView-like) control and some additional buttons
I have a faux dialog which uses this layout: <?xml version=1.0 encoding=utf-8?> <FrameLayout xmlns:android=http://schemas.android.com/apk/res/android
I have a FrameLayout in which I have 2 controls: - a custom view
In my foo_layout.xml file I have a subclassed RelativeLayout: <?xml version=1.0 encoding=utf-8?> <FrameLayout xmlns:android=http://schemas.android.com/apk/res/android
I have an application, which has a Spinner that I want populated with some
I have this element in my layout XML: <FrameLayout android:id=@+id/FrameLayout01 android:layout_width=320sp android:layout_height=380sp android:layout_gravity=center android:background=#99CC33>
I have a RelativeLayout defined in an xml layout file named 'myview.xml' which contains
I have created a custom tab layout which look like this,I want to make
((TextView)((FrameLayout)((LinearLayout)((ViewGroup)getWindow().getDecorView()).getChildAt(0)).getChildAt(0)).getChildAt(0)).setGravity(Gravity.CENTER); I have used this above code for aligning my title of activity in
I have used FrameLayout within a Gallery as the Gallery Item. There are 2

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.