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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:40:30+00:00 2026-06-11T19:40:30+00:00

When using Eclipse’s layout editor to design Android layouts, editing one of the element’s

  • 0

When using Eclipse’s layout editor to design Android layouts, editing one of the element’s ID or moving it will cause all the others to move. Also, wrapping the whole element into another container will cause this problem, too.

enter image description here

This is what happens. After this, moving the elements to the right places is absolutely impossible.

How to fix the problem?

The XML file before editing:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <EditText
        android:id="@+id/securityQuestion"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="31dp"
        android:ems="10"
        android:hint="@string/turvak" >

        <requestFocus />

    </EditText>

    <EditText
        android:id="@+id/securityQuestionAnswer"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignLeft="@+id/securityQuestion"
        android:layout_below="@+id/securityQuestion"
        android:layout_marginTop="24dp"
        android:ems="10"
        android:hint="@string/vastaus"
        android:inputType="textPassword" />

    <EditText
        android:id="@+id/password1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignRight="@+id/securityQuestion"
        android:layout_below="@+id/securityQuestionAnswer"
        android:layout_marginTop="57dp"
        android:ems="10"
        android:hint="@string/salis"
        android:inputType="textPassword" />

    <EditText
        android:id="@+id/password2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignLeft="@+id/password1"
        android:layout_alignRight="@+id/password1"
        android:layout_centerVertical="true"
        android:ems="10"
        android:hint="@string/salasanauudelleen"
        android:inputType="textPassword" >
    </EditText>

    <Button
        android:id="@+id/saveButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignRight="@+id/password2"
        android:layout_below="@+id/password2"
        android:layout_marginTop="30dp"
        android:text="@string/tallenna" />

</RelativeLayout>

And after adding a container, a ScrollView:

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/ScrollView1"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent" >

        <EditText
            android:id="@+id/securityQuestion"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_centerHorizontal="true"
            android:layout_marginTop="31dp"
            android:ems="10"
            android:hint="@string/turvak" >

            <requestFocus />
        </EditText>

        <EditText
            android:id="@+id/securityQuestionAnswer"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignLeft="@+id/securityQuestion"
            android:layout_below="@+id/securityQuestion"
            android:layout_marginTop="24dp"
            android:ems="10"
            android:hint="@string/vastaus"
            android:inputType="textPassword" />

        <EditText
            android:id="@+id/password1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignRight="@+id/securityQuestion"
            android:layout_below="@+id/securityQuestionAnswer"
            android:layout_marginTop="57dp"
            android:ems="10"
            android:hint="@string/salis"
            android:inputType="textPassword" />

        <EditText
            android:id="@+id/password2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignLeft="@+id/password1"
            android:layout_alignRight="@+id/password1"
            android:layout_centerVertical="true"
            android:ems="10"
            android:hint="@string/salasanauudelleen"
            android:inputType="textPassword" >
        </EditText>

        <Button
            android:id="@+id/saveButton"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignRight="@+id/password2"
            android:layout_below="@+id/password2"
            android:layout_marginTop="30dp"
            android:text="@string/tallenna" />
    </RelativeLayout>

</ScrollView>
  • 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-11T19:40:31+00:00Added an answer on June 11, 2026 at 7:40 pm

    I’m guessing you’re using a RelativeLayout. In this layout, views define their location relative to other views. Due to this, changing the position/id of one view, will relocate all views which depend on that view, and all views which depend on views which depend on the edited view and so on. Additionally, when you wrap existing views in another layout container, other views can no longer reference them directly, causing the same behavior.

    You can fix (well, avoid really) this by:

    1. Going to the XML and Find/replacing the ID you want to change. This will change all references to it, and make sure the views don’t try to position themselves to a now non-existent ID
    2. Use a layout like a LinearLayout, in which the View position does not depends on other views (however, view size may).

    Other than that, there is no workaround as this is expected behavior.

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

Sidebar

Related Questions

Using eclipse, first of all. I'm building an Android calculator. I have all my
I'm using Eclipse 3.7 on Ubuntu. Often, after editing a file, I cannot save
I'm using Eclipse for an android application. I'm starting two emulators and sending a
Using Eclipse Version: Helios Service Release 2 Build id: 20110218-0911 with Android plugin. I
I'm using Eclipse to develop a bunch of Android apps and I need to
I am using Eclipse Galileo for android developing . Almost a newbie. My Eclipse
I am using Eclipse Helios 3.6.2. I use it to do Android development using
I am using Eclipse Indigo for Android development. The problem i face is that
I'm using eclipse to develo[p an Android app. the app sends the user name
I am using Eclipse for Android dev and everything was going fine until 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.