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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:23:10+00:00 2026-05-26T14:23:10+00:00

Let say we are in landscape and I have one root container in that

  • 0

Let say we are in landscape and I have one root container
in that container other two(smaller). I want at run time to swap places of cotainers. The container A to go to the place of B and B to go to the place of the layout A.

My layout is defined in xml. So what is the best way to make two element to swap places ?
Is is good to change the properties of for example RelativeLayout.LayoutParams ?

First of all for scenario like this , what is the best layout to be used for the root container ?

after the call of setContentView(R.layout.mylayout);
and after root=findViewById(R.id.root); , a=findViewById(R.id.a);, b=findViewById(R.id.b);

should I remove the child views from the root layout ?
like root.removeallview(); ? or there is something else that I should do ?

I need someone with experience to explain me how should this kind of things done, of course evry suggestion is welcomed and if you have some useful links please share with me.

I want to be able to swap between this two different ways of presenting the layouts.

enter image description here

enter image description here

  • 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-26T14:23:11+00:00Added an answer on May 26, 2026 at 2:23 pm

    If you put these views into Fragments, then you can move the fragments around using a FragmentTransaction.

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

Sidebar

Related Questions

Let say that i have id of another Xlib window and i want to
Let say I have 2 controls in a usercontrol : One (controlA) that have
Let say, that i have defined the same function for windows and mac, with
Let say, I have a web application that allows users to upload images and
let say i have a page , and i want to allow 3rd party
Let say I have two tables with a many-to-many relationship (i.e. there is a
Let say i have 15 or more posts in one page. The code inside
Let say we have two arrays: DateTime[] wDates = new DateTime[20000]; double[] wValues =
Let say I have a file that contains a serialized object by BinaryFomatter. Now
Let say I have this HTML code snippet: <div id=container> <div id=textContent>Text Content Te</div>

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.