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

The Archive Base Latest Questions

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

I find myself using RelativeLayout more than any other types of layouts in Android

  • 0

I find myself using RelativeLayout more than any other types of layouts in Android XML files. Given that my apps use primarily simple and basic interfaces, it is quite easy to bang out a new RelativeLayout.

Currently I create a RelativeLayout and I assign each component of the layout properties such as Layout Below, or Layout Left, or Layout Right to anchor that component to the correct area of the user’s interface.

While it’s easy to define new layouts, it’s hell trying to move a single component within a layout. Given that I’ve used components in my layout to space other components, once a component is moved, the layout around that component falls apart. Moving a component means I have to re-do the relationship for all components below that one. Surely I am doing this wrong? There must be a better way?

TL;DR I use RelativeLayouts and the components I put in the UI to space one-another relatively (of course). If I move a component say to the top, the items below it break as the relative relationship breaks. How can I more easily move components around and experiment with my UI without renaming tens of spacial relationships each time?!

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

    This is one of the cases where the tooling is preferable over hand-coding the layout XML. Editing the XML using the Graphical Layout tab helps ease lot of this pain of refactoring RelativeLayouts. It is not the perfect solution, but it does make things a lot easier.

    I should point out that these changes have come about in ADT 14 and newer. If you are using any older ADT, I suggest you upgrade. In case you do not know how to use the Graphical Editor to get the most out of your RelativeLayouts, check out this video.

    Having said that, the inflexibility of RelativeLayout is the main reason I prefer using nested LinearLayouts over the former – in spite of Google’s suggestions to use the former for performance reasons.

    As a compromise, I use RelativeLayout only for items in a ListView, and nested LinearLayouts for everything else.

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

Sidebar

Related Questions

I still find myself hand coding Visual Studio projects more than using the variety
My PHP code is split between many files, and often I find myself using
I find myself using C++11 more and more lately, and where I would have
I find myself using two identical beans in my applicationContext.xml and my applicationContext-test.xml. I'd
I often find myself using third party libraries - packages and modules - that
I have quite a bit of code that I find myself using over and
I am creating bunch of SD-Card images for Android and find myself using dd
I find myself frequently using Python's interpreter to work with databases, files, etc --
Although using SQL FOR XML EXPLICIT is cumbersome, I find myself using it often.
Here is something that I find myself using from time to time and I

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.