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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:50:28+00:00 2026-06-12T17:50:28+00:00

i have been stumped on this for quite a while now. I am trying

  • 0

i have been stumped on this for quite a while now. I am trying to move my fragment which is contained in a FrameLayout, to the right, so that only the left 20% of the fragment is visible.

The problem I think I am running into is that the parent won’t let the fragment move outside its bounds, or I do not know how to move it. Everything I have tried has just shoved the fragment up against the right wall, and scaling the fragment to fit. I need it to push the fragment outside the right wall. Any help would be more than appreciated.

The final effect I am trying to achieve, is that when you push a put-on the fragment translates into full view, and then with the push of a button translates back to 20% view. i have the animation all set up, just the actual moving of the fragment is stumping me.

  • 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-12T17:50:29+00:00Added an answer on June 12, 2026 at 5:50 pm

    It means that although it animates, that does not mean the fragment itself is where the animation makes it appear to be. It will still receive OnClick events at the original position until it is physically moved.

    You are probably using old-style animations (e.g., TranslateAnimation), which were designed for transient effects, not permanent ones.

    The reason I pointed you to a related question of mine was that many of the solutions, including my own solution use the new animator framework, which is designed for longer-lasting effects.

    Also that example does not help me, I am trying to move it partially off screen, not just scrunch it up against an edge.

    Particularly with respect to the animator framework, there is no material difference between “move it partially off screen” and “scrunch it up against an edge”. For example, if you had read my solution, you would have seen a translateWidgets() method demonstrating a horizontal slide of a set of widgets:

    private void translateWidgets(int deltaX, View... views) {
        for (final View v : views) {
          v.setLayerType(View.LAYER_TYPE_HARDWARE, null);
    
          v.animate().translationXBy(deltaX).setDuration(ANIM_DURATION)
           .setListener(new AnimatorListenerAdapter() {
             @Override
             public void onAnimationEnd(Animator animation) {
               v.setLayerType(View.LAYER_TYPE_NONE, null);
             }
           });
        }
      }
    

    In your case, deltaX would be whatever the appropriate value is to achieve your 20% effect (presumably 0.2f times the container’s width, or something along those lines), or to undo that effect when the full fragment should be seen.

    My answer contains links to full sample projects, both for the native API Level 11 animators, and using the NineOldAndroids backport of the animator framework.

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

Sidebar

Related Questions

I have been stumped for 3 hours now on this problem, I need to
I have been stumped on this one for a while. I want to take
I have been googling about this issue for hours, and I'm stumped. Im trying
I've been stumped for bit on this one - I have a string that
I have been trying to find a solution to this everywhere but am stumped.
I am kind of stumped here and have been trying to figure this out
I am stumped. I have been trying to solve this for 2 days and
I have been researching jquery deferred objects for a while now and I'm stumped
I have been modding Valve games for quite a while, but one that I
I have been stumped for about 3 days now trying to solve a MSBuild

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.