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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:06:54+00:00 2026-05-27T23:06:54+00:00

Am new to android development. I had created one android app and for that

  • 0

Am new to android development. I had created one android app and for that following is my main.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:id="@+id/RelativeLayout01" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent"
android:background="@drawable/bg"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:id="@+id/grid_layout_1"
    android:layout_centerInParent="true"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    >
    <Button android:id="@+id/btnLogin" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content"
        android:text="@string/login_btn_text"/>
    <Button android:id="@+id/btnRegister" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content"
        android:text="@string/reg_btn_text"/>

</LinearLayout>
</RelativeLayout>

Am getting the following warning :

This LinearLayout layout or its RelativeLayout parent is possibly useless;
transfer the background attribute to the other view

Can anyone tell the reason for this warning and a solution to the issue.?

  • 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-27T23:06:55+00:00Added an answer on May 27, 2026 at 11:06 pm

    There is no real usage to have just a LinearLayout inside a RelativeLayout. So one of them is useless as this is redundant.

    edit

    This warning is triggered, when a Layout has only one child that is also a Layout. In this case one of both can be removed without any problems. It is recommended to remove these redundant layouts as they reduce the overall performance of the UI.

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

Sidebar

Related Questions

Hi am newbie to android development. I had created one application where i need
I'm new to android development, and im trying to create an app that is
Hi there Im new to mobile application development. I had developed Android apps using
I'm new to Eclipse/Android development so I'm hoping this is something basic that I'm
I'm new to Android development and am having an issue with my first app's
Very new to Android development, and I am importing a bitmap that is 799
As I am new to Android development, I have used SAX xml parsing in
I'm fairly new to Android development and am working on an app which allows
I'm new to Android development. I have an application that allows the user to
I am new to Android development. In the Notepad sample, I saw the following

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.