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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:28:37+00:00 2026-06-13T03:28:37+00:00

I want to make a layout animated through translation animation from screen’s particular X

  • 0

I want to make a layout animated through translation animation from screen’s particular X Y position. and this is happening very correcty. now the problem starts when animations completes the layout again go to screen’s top rihgt corner. i want the layout stay at the same position on which the animation ends.

 AnimationListener animationListener = new AnimationListener() {

        @Override
        public void onAnimationEnd(Animation arg0) {
            drawer_layout.setVisibility(View.VISIBLE);

        }

        @Override
        public void onAnimationRepeat(Animation animation) {
            // TODO Auto-generated method stub

        }

        @Override
        public void onAnimationStart(Animation animation) {
            drawer_layout.setVisibility(View.VISIBLE);

        }

    };

    final Animation animTranslate = AnimationUtils.loadAnimation(this,
            R.anim.top_to_bottom_in);

    animTranslate.setAnimationListener(animationListener);

    drawer_layout = (LinearLayout) findViewById(R.id.drawer_layout);
    button.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {
            // bitmapBackground = CaptureBackground();

            faded_layout.setBackgroundColor(Color.parseColor("#50ffffff"));

            // HandleDropAnimation(drawer_layout);
            drawer_layout.startAnimation(animTranslate);
        }
    });

and this is my xml.

<?xml version="1.0" encoding="utf-8"?>
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="1000"
android:fromYDelta="25%p"
android:toYDelta="50%p" />
  • 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-13T03:28:39+00:00Added an answer on June 13, 2026 at 3:28 am

    Call

    animTranslate.setFillAfter(true);

    before you start the animation. According to java docs:

    If fillAfter is true, the transformation that this animation performed will persist when it is finished.

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

Sidebar

Related Questions

I want make a bash script which returns the position of an element from
I want to make a layout similar to this one: www.ImageBanana.net - layout.png http://www.imagebanana.com/img/9kmlhy66/thumb/layout.png
I just want to make some HTML page with this layout . How could
I want to make layout that take 100% of the screen height (min) with
I want to make my xml layout more modular because this one is going
I want to make my layout for my first tab something like this: I
I Want To Make This Layout in ASP.Net Page And Want Every Circle Of
For example,I want to make a layout like this: The 'header' can have a
What I want to do is, make layout like this: Title Date Long text
I want to make a table layout as shown in the below screen: 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.