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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:39:58+00:00 2026-06-15T08:39:58+00:00

I have two layouts that call footer.xml, first one is login.xml, and second is

  • 0

I have two layouts that call “footer.xml”, first one is “login.xml”, and second is “main.xml”

When opening the application, onCreate method sets the content view to login.xml.
After I successfully logged in, the main.xml is loaded(successfully).

Now, here’s the problem.

If the main.xml is set as the context view after the user logged in, the footer does not repeat, instead, it is stretched.

I’m wondering why, because the login.xml and main.xml call the footer.xml the same way.

Any solution about this problem?

By the way, here’s the footer.xml

<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
    android:src="@drawable/footer"
    android:tileMode="repeat" />

This is how I call footer.xml with login.xml and main.xml:

    <LinearLayout android:id="@+id/footer"
        android:layout_width="fill_parent"
        android:layout_height="90dip"
        android:background="@layout/footer"
        android:layout_alignParentBottom="true">

    </LinearLayout>

Edit:

I have observed that when pressing the home button, and resuming the app again fixes the footer.
But closing the app using task manager and opening it again does not repeat the background image.
How to solve this?

  • 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-15T08:39:59+00:00Added an answer on June 15, 2026 at 8:39 am

    Found the solution!

    This is my login.xml and main.xml look like:

    <LinearLayout android:id="@+id/footer"
        android:layout_width="fill_parent"
        android:layout_height="90dip"
        android:background="@layout/footer"
        android:layout_alignParentBottom="true">
    
    </LinearLayout>
    

    They are really the same, so they also have the same ID.

    My solution was to change the ID of every xml file.

    For the login.xml,

    <LinearLayout android:id="@+id/loginFooter"
        android:layout_width="fill_parent"
        android:layout_height="90dip"
        android:background="@layout/footer"
        android:layout_alignParentBottom="true">
    
    </LinearLayout>
    

    and for the main.xml,

    <LinearLayout android:id="@+id/mainFooter"
        android:layout_width="fill_parent"
        android:layout_height="90dip"
        android:background="@layout/footer"
        android:layout_alignParentBottom="true">
    
    </LinearLayout>
    

    By doing this, it solved my problem!
    but I don’t know why eclipse does not return errors when compiling having the same IDs on layouts.

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

Sidebar

Related Questions

I have two layouts, one is the main layout inside which I am including
I have a layout that contains two ImageViews. I want one of them to
I have created two folders layout and layout-land with two xml files, one for
Background: I have a UICollectionViewController that shows items in one of two modes, which
I have two tables, we'll call them Foo and Bar , with a one
Guys I m using a simple listview. I have two activities one main and
I have a two column site layout that has the content of the left
I have a two column layout: http://jsfiddle.net/KqQ42/1/ Now I would like that the left
I have two Android applications with a similar functionality but different drawables and layouts.
I created one linear layout and I have added two relative layout. I wish

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.