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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:22:22+00:00 2026-05-17T22:22:22+00:00

I am having a problem in ScrollView. When i run my application on X10i

  • 0

I am having a problem in ScrollView. When i run my application on X10i it works fine but when i change the view to landscape half of the layout at the bottom (RelativeLayout) go down to the screen. Here is my Layout code. please suggest a general solution that will be applicable to all phones not only X10i.

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

<ScrollView  
android:id="@+id/ScrollView"  
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:layout_marginTop="2dip" > 

<RelativeLayout 
android:id="@+id/layoutR" 
android:layout_width="fill_parent" 
android:layout_height="wrap_content"> 

<ImageView android:id="@+id/galleryPic" 
        android:layout_width="140dip" 
        android:layout_height="175dip" 
        android:background="#ff666666" /> 

     <TextView 
     android:id="@+id/lblmail" 
     android:layout_width="wrap_content" 
        android:layout_height="21dip"  
        android:layout_alignParentTop="true" 
        android:layout_marginLeft="5dip"  
        android:text="E_mail:" 
        android:typeface="serif"  
        android:textStyle="bold" 
        android:layout_toRightOf="@+id/galleryPic" /> 

     <EditText  
     android:id="@+id/txt_email"  
     android:layout_width="170dip" 
        android:layout_height="32dip"  
        android:layout_marginLeft="5dip" 
        android:hint="e-mail"  
        android:maxLines="1"  
        android:textSize="10sp" 
        android:typeface="serif"  
        android:textStyle="bold" 
        android:layout_toRightOf="@+id/galleryPic"  
        android:layout_below="@+id/lblmail" /> 

     <TextView  
     android:id="@+id/lblpass"  
     android:layout_width="wrap_content" 
        android:layout_height="21dip"  
        android:layout_marginLeft="5dip" 
        android:text="Password:"  
        android:typeface="serif"  
        android:textStyle="bold" 
        android:layout_toRightOf="@+id/galleryPic"  
        android:layout_below="@+id/txt_email" /> 

     <EditText  
     android:id="@+id/txt_pass"  
     android:layout_width="170dip" 
        android:layout_height="32dip"  
        android:password="true" 
        android:maxLines="1"  
        android:layout_marginLeft="5dip"  
        android:hint="password" 
        android:textSize="10sp"  
        android:typeface="serif"  
        android:textStyle="bold" 
        android:layout_toRightOf="@+id/galleryPic"  
        android:layout_below="@+id/lblpass" /> 

     <TextView  
     android:id="@+id/lblrepass"  
     android:layout_width="wrap_content" 
        android:layout_height="21dip"  
        android:layout_marginLeft="5dip" 
        android:text="Re-Password:"  
        android:typeface="serif" 
        android:textStyle="bold"  
        android:layout_toRightOf="@+id/galleryPic" 
        android:layout_below="@+id/txt_pass" /> 

     <EditText  
     android:id="@+id/txt_repass"  
     android:layout_width="170dip" 
        android:layout_height="32dip"  
        android:password="true" 
        android:maxLines="1"  
        android:layout_marginLeft="5dip"  
        android:hint="re-password" 
        android:textSize="10sp"  
        android:typeface="serif"  
        android:textStyle="bold" 
        android:layout_toRightOf="@+id/galleryPic"  
        android:layout_below="@+id/lblrepass" /> 

     <Button  
     android:id="@+id/btn_Gallery"  
     android:layout_width="wrap_content" 
        android:layout_height="wrap_content"  
        android:gravity="center" 
        android:typeface="serif"  
        android:textStyle="bold"  
        android:text="Browse" 
        android:layout_below="@+id/galleryPic" /> 

     <TextView  
     android:id="@+id/lblname"  
     android:layout_width="wrap_content" 
        android:layout_height="21dip"  
        android:text="Name:"  
        android:typeface="serif" 
        android:textStyle="bold"  
        android:layout_marginTop="6dip" 
        android:layout_below="@+id/btn_Gallery" /> 

     <EditText  
     android:id="@+id/txt_name"  
     android:layout_width="224dip" 
        android:layout_height="32dip"  
        android:hint="name"  
        android:maxLines="1" 
        android:textSize="10sp"  
        android:typeface="serif"  
        android:textStyle="bold" 
        android:layout_marginTop="3dip"  
        android:layout_toRightOf="@+id/lblname" 
        android:layout_below="@+id/btn_Gallery"  
        android:layout_marginLeft="5dip" /> 

     <TextView  
     android:id="@+id/lblage"  
     android:layout_width="wrap_content" 
        android:layout_height="21dip"  
        android:text="Age:"  
        android:typeface="serif" 
        android:textStyle="bold"  
        android:layout_marginTop="9dip" 
        android:layout_below="@+id/lblname" /> 

     <EditText  
     android:id="@+id/txt_age"  
     android:layout_width="225dip" 
        android:layout_height="32dip"  
        android:hint="age"  
        android:numeric="integer" 
        android:maxLines="1"  
        android:maxLength="3"  
        android:textSize="10sp" 
        android:typeface="serif"  
        android:textStyle="bold" 
        android:layout_toRightOf="@+id/lblage"  
        android:layout_below="@+id/txt_name" 
        android:layout_marginLeft="19dip" /> 

     <TextView  
     android:id="@+id/lblsex"  
     android:layout_width="wrap_content" 
        android:layout_height="21dip"  
        android:text="Sex:"  
        android:typeface="serif" 
        android:textStyle="bold"  
        android:layout_marginTop="12dip" 
        android:layout_below="@+id/lblage" /> 

     <EditText  
     android:id="@+id/txt_sex"  
     android:layout_width="226dip" 
        android:layout_height="32dip"  
        android:hint="sex"  
        android:maxLines="1" 
        android:textSize="10sp"  
        android:typeface="serif"  
        android:textStyle="bold" 
        android:layout_toRightOf="@+id/lblsex"  
        android:layout_below="@+id/txt_age" 
        android:layout_marginLeft="20dip" /> 

     <TextView  
     android:id="@+id/lbllocation" 
        android:layout_width="wrap_content"  
        android:layout_height="21dip" 
        android:text="Location:"  
        android:typeface="serif"  
        android:textStyle="bold" 
        android:layout_marginTop="12dip"  
        android:layout_below="@+id/lblsex" /> 

     <EditText  
     android:id="@+id/txt_location" 
        android:layout_width="206dip"  
        android:layout_height="32dip" 
        android:hint="location"  
        android:maxLines="1"  
        android:textSize="10sp" 
        android:typeface="serif"  
        android:textStyle="bold" 
        android:layout_toRightOf="@+id/lbllocation"  
        android:layout_below="@+id/txt_sex" 
        android:layout_marginLeft="5dip" /> 

     <TextView  
     android:id="@+id/lblstatus"  
     android:layout_width="wrap_content" 
        android:layout_height="21dip"  
        android:text="Status:" 
        android:typeface="serif"  
        android:textStyle="bold" 
        android:layout_marginTop="12dip"  
        android:layout_below="@+id/lbllocation" /> 

     <EditText  
     android:id="@+id/txt_status"  
     android:layout_width="225dip" 
        android:layout_height="32dip"  
        android:hint="status"  
        android:maxLines="1" 
        android:textSize="10sp"  
        android:typeface="serif"  
        android:textStyle="bold" 
        android:layout_toRightOf="@+id/lblstatus"  
        android:layout_below="@+id/txt_location" 
        android:layout_marginLeft="5dip" /> 

        <TextView  
        android:id="@+id/lblinterest" 
        android:layout_width="wrap_content"  
        android:layout_height="21dip" 
        android:text="Interest:"  
        android:typeface="serif" android:textStyle="bold" 
        android:layout_marginTop="12dip"  
        android:layout_below="@+id/lblstatus" /> 

        <EditText  
        android:id="@+id/txt_interest" 
        android:layout_width="212dip"  
        android:layout_height="32dip" 
        android:hint="interest"  
        android:maxLines="1"  
        android:textSize="10sp" 
        android:typeface="serif"  
        android:textStyle="bold" 
        android:layout_toRightOf="@+id/lblinterest"  
        android:layout_below="@+id/txt_status" 
        android:layout_marginLeft="5dip" /> 

     <TextView  
     android:id="@+id/lblorientation" 
        android:layout_width="wrap_content"  
        android:layout_height="21dip" 
        android:text="Orientation:"  
        android:typeface="serif" 
        android:textStyle="bold"  
        android:layout_marginTop="12dip" 
        android:layout_below="@+id/lblinterest" /> 

        <EditText  
        android:id="@+id/txt_orientation" 
        android:layout_width="187dip" 
        android:layout_height="32dip" 
        android:hint="status" 
        android:maxLines="1" 
        android:textSize="10sp" 
        android:typeface="serif"  
        android:textStyle="bold" 
        android:layout_toRightOf="@+id/lblorientation" 
        android:layout_below="@+id/txt_interest" 
        android:layout_marginLeft="5dip"/></RelativeLayout></ScrollView> 
<RelativeLayout 
  android:layout_marginTop="-32dip" 
  android:gravity="bottom" 
  android:layout_height="50dip"  
  android:layout_width="fill_parent"
  android:background="#ff999999"> 

<Button  
 android:id="@+id/btnNext"  
 android:layout_width="100dip"  
 android:layout_height="45dip"  
 android:text="Next" 
 android:layout_marginTop="2dip" 
 android:layout_alignParentRight="true"/></RelativeLayout></LinearLayout>
  • 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-17T22:22:22+00:00Added an answer on May 17, 2026 at 10:22 pm

    That’s a lot of XML. O_o

    Creating two separate layouts really shouldn’t be necessary to fix the problem you’re having. Here is what I would suggest (I’m cutting out the intermediate TextViews, just to shorten the example):

    <?xml version="1.0" encoding="utf-8"?>  
    
    <RelativeLayout
        xmlns:android="http://schemas.android.com/apk/res/android"  
        android:orientation="vertical"  
        android:layout_height="fill_parent"   
        android:layout_width="fill_parent"
        >  
        <RelativeLayout
            android:id="@+id/footer"  
            android:layout_height="wrap_content"   
            android:layout_width="fill_parent" 
            android:background="#ff999999"
        android:layout_alignParentBottom="true"
            >  
            <Button   
                android:id="@+id/btnNext"   
                android:layout_width="wrap_content"   
                android:layout_height="wrap_content"   
                android:text="Next"  
                android:layout_marginTop="2dip" />
        </RelativeLayout>
    
        <ScrollView   
            android:id="@+id/ScrollView"   
            android:layout_width="fill_parent"  
            android:layout_height="fill_parent"  
            android:layout_marginTop="2dip" 
            android:layout_above="@id/footer"
                android:layout_alignParentTop="true"
            >  
            <RelativeLayout  
                android:id="@+id/layoutR"  
                android:layout_width="fill_parent"  
                android:layout_height="wrap_content"
                >
    
            //XML removed for ease of viewing
    
            </RelativeLayout>
        </ScrollView>    
    </RelativeLayout>
    

    Basically, putting the whole thing into a RelativeLayout set to fill_parent. Define your footer (with the “Next” button) first, and align it to the bottom right. Next, define your ScrollView set to fill_parent as well, and aligned above your footer (this will make the ScrollView fill all available space remaining after the footer is defined). And of course, place all your TextViews and EditTexts, etc., back into that RelativeLayout. I’m not able to test this right now, but it should get you fairly close.

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

Sidebar

Related Questions

I'm having a problem with an application hanging and giving me the default Please
I'm having a memory problem related to UIImageView. After adding this view to my
I am building an application that must add an overlay view once a scrollview
I've been having a problem to show large images on a scrollview, the images
We're having problem with a huge number of legacy stored procedures at work. Do
I'm having problem in the following line: rd.PrintOptions.PaperSize = PaperSize.PaperFanfoldStdGerman; it throws an exception
Having a problem getting a TreeView control to display node images. The code below
Having a problem trying to create a function, as part of a BizTalk helper
Im having a problem with a final part of my assignment. We get in
We were having a problem with our build server not checking out modifications from

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.