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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:37:05+00:00 2026-05-14T02:37:05+00:00

I am trying to swap two LinearLayouts by setting their visibility properties to VISIBLE

  • 0

I am trying to swap two LinearLayouts by setting their visibility properties to “VISIBLE” and “GONE” respectively. I am also using an animation while the layouts are being swapped. The animation completes successfully and I see the correct layout. However, the previous Layout which has its visibility property set to “GONE” still receives clicks even though it’s not visible. At the same time, the layout which is “VISIBLE” receives clicks only when clicked in area where the “GONE” layout isn’t clickable. I am also calling the requestFocus method on the “VISIBLE” layout. But it doesn’t help.

Moreover, if I skip the animation part and just set the visibility properties, everything works correctly.

What am I missing 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-14T02:37:05+00:00Added an answer on May 14, 2026 at 2:37 am

    If you are animating widgets, you need to make changes to the layout to have the results “stick”. Just using the fillAfter stuff will give you some of the effects you see — it is drawing them in the new location but they aren’t really in the new location.

    So, I would start by turning off any fill* settings (e.g., fillAfter) in your animation. See what your animation behaves like then. Most likely, it visually will now depict what the clicks tell you.

    Then, set up an AnimationListener to get control when the animation ends, and at that point, make real changes to the widgets and their containers to affect your end positions.

    Here is a sample project that demonstrates what I mean, albeit in an overly complicated fashion, since I am animating a custom View rather than an off-the-shelf widget.

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

Sidebar

Related Questions

I'm trying to swap two variables in ActionScript. I tried using: a = 42
I am trying to 'swap' two cells' contents, and their mappings. To do this,
Here I am trying to swap two characters in a string using XOR operation.
I am trying to swap two adjacent nodes in a linked list, and I
I am trying to swap two images .x and .y positions. The method I
I'm trying to figure out how to use RJS to swap between two fields...
I'm trying to swap two std::list< dontcare* >::iterators under Visual 2005. Iter it1 =
I'm playing with awk and I'm trying to swap the first two fields of
I am trying to switch the id's of two rows in mysql using php
I have created two textboxes via annotation(.) in a figure. Most of their properties

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.