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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:22:45+00:00 2026-06-09T11:22:45+00:00

I am having troubles with my XML in Android. In the graphical layout view

  • 0

I am having troubles with my XML in Android. In the graphical layout view it looks exactly how I want it to, however when I run a simulation on a 10.1″ screen it matches the parent in width but not height. When I run a simulation on my 10.1″ tablet it matches neither the parents width or height. This is my code,

<?xml version="1.0" encoding="utf-8"?>
<ScrollView
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:fillViewport="true">
  <RelativeLayout 
        android:layout_width="match_parent"
        android:layout_height="wrap_content" android:background="#fff">

        <!--  Header  Starts-->
        <LinearLayout android:id="@+id/header"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@layout/header_gradient"
                android:paddingTop="5dip"
                android:paddingBottom="5dip">
                <!-- Logo Start-->
                <ImageView android:src="@drawable/logo"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginLeft="10dip"/>
                <!-- Logo Ends -->
        </LinearLayout>
        <!--  Header Ends --> 
        <!-- Footer Start -->
        <LinearLayout android:id="@+id/footer"
                android:layout_width="match_parent"
                android:layout_height="90dip"
                android:background="@layout/footer_repeat"
                android:layout_alignParentBottom="true">
        </LinearLayout>
        <!-- Footer Ends --> 

        <!-- Registration Form -->
        <LinearLayout
          xmlns:android="http://schemas.android.com/apk/res/android"
          android:orientation="vertical"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:padding="10dip"
          android:layout_below="@id/header">
          <!-- Full Name Label -->
          <TextView android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textColor="#372c24"
                android:text="Full Name"/>
          <EditText android:id="@+id/reg_fullname" 
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="5dip"
                android:singleLine="true"
                android:layout_marginBottom="20dip"/>
          <!--  Email Label -->
          <TextView android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textColor="#372c24"
                android:text="Email"/>
          <EditText android:id="@+id/reg_email" 
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="5dip"
                android:singleLine="true"
                android:layout_marginBottom="20dip"/>
          <!-- Password Label -->
          <TextView android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textColor="#372c24"
                android:text="Password"/>
          <EditText android:id="@+id/reg_password" 
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:password="true"
                android:singleLine="true"
                android:layout_marginTop="5dip"/>
          <!-- Register Button -->      
          <Button android:id="@+id/btnRegister" 
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dip"
                android:text="Register New Account"/>
          <!-- Link to Login Screen -->
          <TextView android:id="@+id/link_to_login" 
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="40dip"
                android:layout_marginBottom="40dip"
                android:text="Have an account? Login here"
                android:gravity="center"
                android:textSize="20dip"
                android:textColor="#025f7c"/>

        </LinearLayout>
        <!-- Registration Form Ends -->


  </RelativeLayout>
</ScrollView>

This is how it is shown in graphical layout and is how I want it look,

enter image description here

This is how it looks on an android virtual machine 3.2 simulation,

enter image description here

and finally, this is how it looks on my Samsung galaxy 10.1″ tablet,

enter image description here

can anyone see where I have gone wrong? Thank you

  • 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-09T11:22:46+00:00Added an answer on June 9, 2026 at 11:22 am

    Just add the
    android:largeScreens="true" and android:xlargeScreens="true"

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

Sidebar

Related Questions

I'm having troubles trying to style my tabs in android. I want to make
I am running the HelloGallery example for Android (using the XML layout file below),
I’m having trouble declaring my bitmap/drawable in appropriate xml According to convoluted android docs,
I am new to Android Development and I am having trouble with my XML
I'm having trouble adding a button to a layout that I've created in XML.
I'm having troubles working with fragments to the 2.2 platform. I imported the android-support-v4.jar
I have the following layout for my ImageView : <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android
I am using Jackrabbit 2.4.0 and I am having trouble updating XML which has
I am having trouble creating an XML document that contains a default namespace and
I'm having trouble editing an XML file. I'm currently trying to use Nokogiri ,

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.