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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:34:41+00:00 2026-05-25T09:34:41+00:00

I am having some trouble with my xml file. Well it was working at

  • 0

I am having some trouble with my xml file. Well it was working at first but the later I wanted to give it a scroll view so I added the scroll view on to the main.xml. After saving the file. The app used to crash without launching. Seeing this I removed the scroll view on the main.xml file, and am facing a new problem in which all of the buttons are being overlapped one another.

Also if you could tell me how can I give a scroll view tag correctly it would be helpful.
Cheers. Thank you !

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>

<TextView  
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:text="Creating and Using Databases without Content Provider"/>

<EditText 
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/edit"
android:padding="6dip"/>

 <EditText 
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/msg"
android:padding="6dip"/>

<Button 
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text = "Add a new book"
android:id="@+id/addTitle"
android:padding="6dip"/>

<Button 
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/upTitle"
android:text="Update a book"
android:padding="6dip"/>

<Button 
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/rtrTitles"
android:text="Retrieve all books"
android:padding="6dip"/>

<Button 
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/rtrTitle"
android:text="Retrieve Specific book"
android:padding="6dip"/>

<Button 
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/delTitle"
android:text="Delete a book"
android:padding="6dip"/>

<Button 
android:text="Send SMS" 
android:id="@+id/sms" 
android:layout_width="fill_parent" 
android:layout_height="wrap_content"
android:padding="6dip"/>

</RelativeLayout>

This is the main xml file with the buttons overlapping.

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView  
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:text="Creating and Using Databases without Content Provider"/>

<EditText 
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/edit"
android:padding="6dip"/>

<EditText 
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/msg"
android:padding="6dip"/>

<Button 
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text = "Add a new book"
android:id="@+id/addTitle"
android:padding="6dip"/>

<Button 
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/upTitle"
android:text="Update a book"
android:padding="6dip"/>

<Button 
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/rtrTitles"
android:text="Retrieve all books"
android:padding="6dip"/>

<Button 
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/rtrTitle"
android:text="Retrieve Specific book"
android:padding="6dip"/>

<Button 
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/delTitle"
android:text="Delete a book"
android:padding="6dip"/>

<Button 
android:text="Send SMS" 
android:id="@+id/sms" 
android:layout_width="fill_parent" 
android:layout_height="wrap_content"
android:padding="6dip"/>
</ScrollView>
</RelativeLayout>

This is the main.xml with scroll view

  • 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-25T09:34:42+00:00Added an answer on May 25, 2026 at 9:34 am

    You are using a RelativeLayout and not actually “placing” the buttons beside, or on top, or whatever of each other using something like the android:layout_toRightOf tags. The scrollview must be the parent view because it can only accept one child, which in your situation should be a LinearLayout (or a relative if your going to place your objects correctly). The main issue with your xml however is that RelativeLayout.

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

Sidebar

Related Questions

Im having some trouble looping through some xml data. The xml file is structured
I'm having some trouble using XmlReader to read an XML file. I can open
My problem is specifically about some trouble I'm having parsing an Inkscape (XML) file,
I'm having some trouble with an xml file, I have found all sorts of
I'm having some trouble parsing an XML file with ColdFusion. I've double, triple-checked the
I need to parse an XLIFF file using C#, but I'm having some trouble.
I'm having trouble dealing with some XML file (which is at the end of
Hi I'm Having some trouble, i was wonder how to read an XML file
I'm having trouble with some data I've imported from an XML file. Unfortunately I'm
I'm having some trouble parsing malformed XML in PHP. In particular I'm querying a

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.