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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T00:32:50+00:00 2026-06-19T00:32:50+00:00

I have the following layout and am trying to make the layout scroll. I

  • 0

I have the following layout and am trying to make the layout scroll. I added a ScrollView, but I must have it in the wrong place. Can anyoine with knowledge of android layouts help?

Here is my xml:

<?xml version="1.0" encoding="utf-8"?>
<ScrollView
    android:id="@+id/myScrollLayout"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="vertical"
        android:background="@drawable/gradient"
        android:focusable="true"
        android:focusableInTouchMode="true"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:id="@+id/filterOptions">
        <TextView
            android:id="@+id/tvHeaderText"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:layout_marginLeft="0dp"
            android:layout_marginRight="0dp"
            android:text=""
            android:textColor="#ffffffff"
            android:textSize="20sp"
            android:shadowColor="#7F000000"
            android:shadowDx="1"
            android:shadowDy="1"
            android:shadowRadius="2"
            android:layout_centerVertical="true"
            android:paddingTop="3dp"
            android:paddingBottom="3dp"
            android:background="@drawable/gradientNews" />
        <TextView
            android:id="@+id/textView1"
            android:text="Distance"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:textSize="16sp"
            android:textColor="#ff000000" />
        <RelativeLayout
            android:minWidth="25px"
            android:minHeight="25px"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:id="@+id/relativeLayout1">
            <Spinner
                android:id="@+id/spWithinMiles"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_toRightOf="@+id/textView1"
                android:textColor="#FF0000" />
        </RelativeLayout>
        <TextView
            android:id="@+id/tvPracticeType"
            android:text="Practice Type"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:textSize="16sp"
            android:textColor="#ff000000" />
        <RelativeLayout
            android:minWidth="25px"
            android:minHeight="25px"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:id="@+id/relativeLayout2">
            <Spinner
                android:id="@+id/spPracticeType"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_toRightOf="@+id/tvPracticeType"
                android:textColor="#FF0000" />
        </RelativeLayout>
        <TextView
            android:id="@+id/tvForeignLanguage"
            android:text="Language"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:textSize="16sp"
            android:textColor="#ff000000" />
        <RelativeLayout
            android:minWidth="25px"
            android:minHeight="25px"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:id="@+id/relativeLayout3">
            <Spinner
                android:id="@+id/spForeignLanguage"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_toRightOf="@+id/tvForeignLanguage"
                android:textColor="#FF0000" />
        </RelativeLayout>
        <TextView
            android:id="@+id/tvTreatmentOptions"
            android:text="Treatment Options"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:textSize="16sp"
            android:textColor="#ff000000" />
        <RelativeLayout
            android:minWidth="25px"
            android:minHeight="25px"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:id="@+id/rlTreatmentOptions">
            <CheckBox
                android:text="Handicapped Accessible"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textColor="#ff000000"
                android:id="@+id/cbHandicappedAccessible" />
            <CheckBox
                android:text="Home Visits"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@+id/cbHandicappedAccessible"
                android:textColor="#ff000000"
                android:id="@+id/cbHomeVisits" />
            <CheckBox
                android:text="Treat Age One"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@+id/cbHomeVisits"
                android:textColor="#ff000000"
                android:id="@+id/cbTreatAgeOne" />
            <CheckBox
                android:text="Treat Special Needs"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@+id/cbTreatAgeOne"
                android:textColor="#ff000000"
                android:id="@+id/cbTreatSpecialNeeds" />
            <CheckBox
                android:text="Grin &amp; Wear It Mouthguard"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@+id/cbTreatSpecialNeeds"
                android:textColor="#ff000000"
                android:id="@+id/cbGrinWearItMouthguard" />
        </RelativeLayout>
        <TextView
            android:id="@+id/tvPracticeOptions"
            android:text="Practice Options"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:textSize="16sp"
            android:textColor="#ff000000" />
        <RelativeLayout
            android:minWidth="25px"
            android:minHeight="25px"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:id="@+id/rlPracticeOptions">
            <CheckBox
                android:text="Website"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textColor="#ff000000"
                android:id="@+id/cbWebsite" />
            <CheckBox
                android:text="Early hours"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@+id/cbWebsite"
                android:textColor="#ff000000"
                android:id="@+id/cbEarlyHours" />
            <CheckBox
                android:text="Late hours"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@+id/cbEarlyHours"
                android:textColor="#ff000000"
                android:id="@+id/cbLateHours" />
            <CheckBox
                android:text="Saturday hours"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@+id/cbLateHours"
                android:textColor="#ff000000"
                android:id="@+id/cbSaturdayHours" />
            <CheckBox
                android:text="Multispecialty Practice"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@+id/cbSaturdayHours"
                android:textColor="#ff000000"
                android:id="@+id/cbMultispecialtyPractice" />
        </RelativeLayout>
    </LinearLayout>
</ScrollView>
  • 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-19T00:32:52+00:00Added an answer on June 19, 2026 at 12:32 am

    As f20k already mentioned :

    The xlmns:android=”…” should be on the top most layout

    Take a look :

    <?xml version="1.0" encoding="utf-8"?>
    <ScrollView  xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/myScrollLayout"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content">
        <LinearLayout
            android:orientation="vertical"
            android:background="@drawable/gradient"
            android:focusable="true"
            android:focusableInTouchMode="true"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:id="@+id/filterOptions">
            <TextView
                android:id="@+id/tvHeaderText"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:layout_marginLeft="0dp"
                android:layout_marginRight="0dp"
                android:text=""
                android:textColor="#ffffffff"
                android:textSize="20sp"
                android:shadowColor="#7F000000"
                android:shadowDx="1"
                android:shadowDy="1"
                android:shadowRadius="2"
                android:layout_centerVertical="true"
                android:paddingTop="3dp"
                android:paddingBottom="3dp"
                android:background="@drawable/gradientNews" />
            <TextView
                android:id="@+id/textView1"
                android:text="Distance"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:textSize="16sp"
                android:textColor="#ff000000" />
            <RelativeLayout
                android:minWidth="25px"
                android:minHeight="25px"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:id="@+id/relativeLayout1">
                <Spinner
                    android:id="@+id/spWithinMiles"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_toRightOf="@+id/textView1"
                    android:textColor="#FF0000" />
            </RelativeLayout>
            <TextView
                android:id="@+id/tvPracticeType"
                android:text="Practice Type"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:textSize="16sp"
                android:textColor="#ff000000" />
            <RelativeLayout
                android:minWidth="25px"
                android:minHeight="25px"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:id="@+id/relativeLayout2">
                <Spinner
                    android:id="@+id/spPracticeType"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_toRightOf="@+id/tvPracticeType"
                    android:textColor="#FF0000" />
            </RelativeLayout>
            <TextView
                android:id="@+id/tvForeignLanguage"
                android:text="Language"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:textSize="16sp"
                android:textColor="#ff000000" />
            <RelativeLayout
                android:minWidth="25px"
                android:minHeight="25px"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:id="@+id/relativeLayout3">
                <Spinner
                    android:id="@+id/spForeignLanguage"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_toRightOf="@+id/tvForeignLanguage"
                    android:textColor="#FF0000" />
            </RelativeLayout>
            <TextView
                android:id="@+id/tvTreatmentOptions"
                android:text="Treatment Options"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:textSize="16sp"
                android:textColor="#ff000000" />
            <RelativeLayout
                android:minWidth="25px"
                android:minHeight="25px"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:id="@+id/rlTreatmentOptions">
                <CheckBox
                    android:text="Handicapped Accessible"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textColor="#ff000000"
                    android:id="@+id/cbHandicappedAccessible" />
                <CheckBox
                    android:text="Home Visits"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_below="@+id/cbHandicappedAccessible"
                    android:textColor="#ff000000"
                    android:id="@+id/cbHomeVisits" />
                <CheckBox
                    android:text="Treat Age One"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_below="@+id/cbHomeVisits"
                    android:textColor="#ff000000"
                    android:id="@+id/cbTreatAgeOne" />
                <CheckBox
                    android:text="Treat Special Needs"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_below="@+id/cbTreatAgeOne"
                    android:textColor="#ff000000"
                    android:id="@+id/cbTreatSpecialNeeds" />
                <CheckBox
                    android:text="Grin &amp; Wear It Mouthguard"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_below="@+id/cbTreatSpecialNeeds"
                    android:textColor="#ff000000"
                    android:id="@+id/cbGrinWearItMouthguard" />
            </RelativeLayout>
            <TextView
                android:id="@+id/tvPracticeOptions"
                android:text="Practice Options"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:textSize="16sp"
                android:textColor="#ff000000" />
            <RelativeLayout
                android:minWidth="25px"
                android:minHeight="25px"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:id="@+id/rlPracticeOptions">
                <CheckBox
                    android:text="Website"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textColor="#ff000000"
                    android:id="@+id/cbWebsite" />
                <CheckBox
                    android:text="Early hours"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_below="@+id/cbWebsite"
                    android:textColor="#ff000000"
                    android:id="@+id/cbEarlyHours" />
                <CheckBox
                    android:text="Late hours"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_below="@+id/cbEarlyHours"
                    android:textColor="#ff000000"
                    android:id="@+id/cbLateHours" />
                <CheckBox
                    android:text="Saturday hours"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_below="@+id/cbLateHours"
                    android:textColor="#ff000000"
                    android:id="@+id/cbSaturdayHours" />
                <CheckBox
                    android:text="Multispecialty Practice"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_below="@+id/cbSaturdayHours"
                    android:textColor="#ff000000"
                    android:id="@+id/cbMultispecialtyPractice" />
            </RelativeLayout>
        </LinearLayout>
    </ScrollView>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to figure out how to make my layout have the following
Greetings, I have the following layout in Android. I'm trying to make it so
I'm trying to make a layout where I have a Div that gets added
I'm trying to make the following form in JSF 2.0 but a have some
I have the following XML. I'm trying to make a static button underneath my
I am trying to make photo gallery application.But I am having following error and
I am trying to make it such that the layout looks like the following
Hi im trying to accomplish the following layout. I have two RelativeLayout, each one
I have the following layout in my page (simplified) <h:form> <h:commandButton action=#{bean.save} value=Save/> <rich:tabPanel
I have the following layout for my mvc project: /Controllers /Demo /Demo/DemoArea1Controller /Demo/DemoArea2Controller etc...

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.