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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T07:19:12+00:00 2026-05-21T07:19:12+00:00

i want to Android xml design in the following format i did but it

  • 0

i want to Android xml design in the following format i did but it does not work.

xml layout:coding

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout android:id="@+id/LinearLayout01"
        android:layout_width="fill_parent" android:layout_height="fill_parent"
        xmlns:android="http://schemas.android.com/apk/res/android">
        <TableLayout android:id="@+id/widget836"
            android:layout_width="wrap_content" android:layout_height="wrap_content"
            android:orientation="vertical">
            <ImageView android:id="@+id/widget837" android:layout_width="wrap_content"
                android:layout_height="wrap_content">
            </ImageView>
        </TableLayout>
        <ScrollView android:id="@+id/ScrollView111"
            android:layout_width="fill_parent" android:layout_height="fill_parent">

            <AbsoluteLayout android:id="@+id/widget883"
                android:layout_width="wrap_content" android:layout_height="wrap_content">

                <EditText android:id="@+id/email" android:layout_width="303px"
                    android:layout_height="56px" android:text="Email" android:textSize="18sp"
                    android:layout_x="1px" android:layout_y="15px">
                </EditText>
                <EditText android:id="@+id/pass" android:layout_width="303px"
                    android:layout_height="56px" android:text="password"
                    android:textSize="18sp" android:layout_x="3px" android:layout_y="57px">
                </EditText>

                <TextView android:id="@+id/enter" android:layout_width="fill_parent"
                    android:layout_height="fill_parent"
                    android:text="Enter an email address and password above, and your accout will be created."
                    android:layout_x="0px" android:layout_y="65px">
                </TextView>
                <TextView android:id="@+id/primarydisplay"
                    android:layout_width="100px" android:layout_height="40px"
                    android:text="Primary Display" android:textStyle="bold"
                    android:layout_x="0px" android:layout_y="75px">
                </TextView>
                <TextView android:id="@+id/gps" android:layout_width="100px"
                    android:layout_height="40px" android:text="Speed >"
                    android:textStyle="bold" android:layout_x="200px" android:layout_y="75px">
                </TextView>
            </AbsoluteLayout>
            <AbsoluteLayout android:id="@+id/widget884"
                android:layout_width="wrap_content" android:layout_height="wrap_content">
                <TextView android:id="@+id/distanceunit"
                    android:layout_width="100px" android:layout_height="40px"
                    android:text="Distance Unit" android:textStyle="bold"
                    android:layout_x="0px" android:layout_y="85px">
                </TextView>
                <TextView android:id="@+id/miles" android:layout_width="100px"
                    android:layout_height="40px" android:text="Miles >"
                    android:textStyle="bold" android:layout_x="200px" android:layout_y="85px">
                </TextView>
            </AbsoluteLayout>
        </ScrollView>
    </LinearLayout>

Log cat error:

Caused by: java.lang.IllegalStateException: ScrollView can host only one direct child

pleae correct me.

  • 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-21T07:19:12+00:00Added an answer on May 21, 2026 at 7:19 am

    You can only have one direct child element in a Scrollview so you should either combine your two AbsoluteLayout elements or you should wrap them in another element such as another AbsoluteLayout element.

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout android:id="@+id/LinearLayout01"
        android:layout_width="fill_parent" android:layout_height="fill_parent"
        xmlns:android="http://schemas.android.com/apk/res/android">
        <TableLayout android:id="@+id/widget836"
            android:layout_width="wrap_content" android:layout_height="wrap_content"
            android:orientation="vertical">
            <ImageView android:id="@+id/widget837" android:layout_width="wrap_content"
                android:layout_height="wrap_content">
            </ImageView>
        </TableLayout>
        <ScrollView android:id="@+id/ScrollView111"
            android:layout_width="fill_parent" android:layout_height="fill_parent">
            <!-- Wrap -->
            <AbsoluteLayout
                 android:layout_width="wrap_content" android:layout_height="wrap_content">
    
                <AbsoluteLayout android:id="@+id/widget883"
                  android:layout_width="wrap_content" android:layout_height="wrap_content">
    
                  <EditText android:id="@+id/email" android:layout_width="303px"
                    android:layout_height="56px" android:text="Email" android:textSize="18sp"
                    android:layout_x="1px" android:layout_y="15px">
                  </EditText>
                  <EditText android:id="@+id/pass" android:layout_width="303px"
                    android:layout_height="56px" android:text="password"
                    android:textSize="18sp" android:layout_x="3px" android:layout_y="57px">
                  </EditText>
    
                  <TextView android:id="@+id/enter" android:layout_width="fill_parent"
                    android:layout_height="fill_parent"
                    android:text="Enter an email address and password above, and your accout will be created."
                    android:layout_x="0px" android:layout_y="65px">
                  </TextView>
                  <TextView android:id="@+id/primarydisplay"
                    android:layout_width="100px" android:layout_height="40px"
                    android:text="Primary Display" android:textStyle="bold"
                    android:layout_x="0px" android:layout_y="75px">
                  </TextView>
                  <TextView android:id="@+id/gps" android:layout_width="100px"
                    android:layout_height="40px" android:text="Speed >"
                    android:textStyle="bold" android:layout_x="200px" android:layout_y="75px">
                  </TextView>
              </AbsoluteLayout>
              <AbsoluteLayout android:id="@+id/widget884"
                android:layout_width="wrap_content" android:layout_height="wrap_content">
                  <TextView android:id="@+id/distanceunit"
                    android:layout_width="100px" android:layout_height="40px"
                    android:text="Distance Unit" android:textStyle="bold"
                    android:layout_x="0px" android:layout_y="85px">
                  </TextView>
                  <TextView android:id="@+id/miles" android:layout_width="100px"
                    android:layout_height="40px" android:text="Miles >"
                    android:textStyle="bold" android:layout_x="200px" android:layout_y="85px">
                  </TextView>
              </AbsoluteLayout>
    
            </AbsoluteLayout>
            <!-- /Wrap -->
        </ScrollView>
    </LinearLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

my Android xml fle Design look like this. but i want to view like
I want to design this layout in Android XML i wrote the xml and
I want to translate app in Android (strings.xml and array.xml), but I don't know
I want to design layout for following requirement |-------------------------| |Image | Text View 1
I want install Android version 1.6 SDK. I already have Android development setup with
I want install android on my computer but using the sdk it fails to
I have made following relative layout in an xml file lets say add_relative_layout.xml <?xml
I need to center grid view horizontally in my android layout.xml. I have searched
I know Java apps can be run in Android. But what I want to
I am new to Android. I want to convert a XML file to HTML

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.