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

  • Home
  • SEARCH
  • 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 6728869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:13:16+00:00 2026-05-26T10:13:16+00:00

I originally posted this queston on coderanch, but I didn’t get responses, so I

  • 0

I originally posted this queston on coderanch, but I didn’t get responses, so I am trying my luck here.

I am trying to replace fragment1 with fragment3 by clicking on a ‘Change Fragment’ Button defined in fragmen2. Fragment3 will not fully replace Fragment1 completely. Instead it lines itself up underneath the text in Fragment1. I am doing something silly and I could use some pointers. I have included the code here and the output error screenshot (the gray area fragment3 doesn’t completely overlay the white area fragment1). Thanks for any pointers.

I tried to upload and format all the code here, but for some reason, it tells me my code is not indented with 4 spaces and my output image is not a jpeg image. So I got the code posted at
http://www.coderanch.com/t/556305/Android/Mobile/Dynamically-replacing-Fragments
Sorry I couldn’t post it here.

On my output, I see that fragment3.xml doesn’t completely overlap fragment1.xml. Any help would be sincerely appreciated. Thanks

  • 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-26T10:13:17+00:00Added an answer on May 26, 2026 at 10:13 am

    You should not use R.id.fragment1 . You should give an Id for the FrameLayout and replace the contents of the FrameLayout with fragment2.

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

Sidebar

Related Questions

Originally, I posted this on ServerFault ... but perhaps it is more of a
I originally posted this question over at the Zend Forums but figured it would
Originally this bug was posted here: https://rails.lighthouseapp.com/projects/8994/tickets/5713-ruby-19-ku-incompatible-with-mem_cache_store And now, as we've run into the
This is a question that extends from the originally posted here: Link to loading-xaml
Update I don't think I was clear enough when I originally posted this quesion.
Note this question was originally posted in 2009, before C++11 was ratified and before
Originally posted on Server Fault , where it was suggested this question might better
I originally posted this question on the miglayout forum and after 534 views and
I originally posted a question here I've discovered that the JTextField only resizes if
Hello I recently posted this question but very badly explained the problem, but i'll

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.