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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T14:42:47+00:00 2026-05-21T14:42:47+00:00

So for the project I’m working on I need to be able to move

  • 0

So for the project I’m working on I need to be able to move widgets up the screen during runtime (like a reverse waterfall). Could someone please show an example of how to move a button from one position of the screen to a higher position (using an absolute layout) during runtime?

I know it probably makes use of

 AbsoluteLayout.LayoutParams

or params.addRule hopefully. But please do care to teach me

For Example:
_____________________(Top Of Screen)
| [button]
| –
| –
| –
| –
| –
| –
| –
| >
| [button]
_____________________(Bottom Of Screen)

  • 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-21T14:42:48+00:00Added an answer on May 21, 2026 at 2:42 pm

    From http://developerlife.com/tutorials/?p=343

    Here’s a slide-from-left animation (translate from right to left across the width of the view), named “/res/anim/slide_right.xml”:

    <?xml version="1.0" encoding="utf-8"?>
    
    <set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/accelerate_interpolator">
        <translate android:fromXDelta="100%p" android:toXDelta="0" android:duration="150" />
    </set>
    

    Here’s another animation sequence that uses the one above (@anim/slide_right.xml -> “/res/anim/slide_right.xml”):

    <?xml version="1.0" encoding="utf-8"?>
    
    <layoutAnimation xmlns:android="http://schemas.android.com/apk/res/android"
            android:delay="10%"
            android:order="reverse"
            android:animation="@anim/slide_right" />
    

    So you can create your sequences in XML and put them in the “/res/anim/some_file.xml” of your Android project resources. You can get more details on how to create this XML file here.

    You can also do this by code::

      AnimationSet set = new AnimationSet(true);
    
      Animation animation = new AlphaAnimation(0.0f, 1.0f);
      animation.setDuration(100);
      set.addAnimation(animation);
    
      animation = new TranslateAnimation(
          Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f,
          Animation.RELATIVE_TO_SELF, -1.0f, Animation.RELATIVE_TO_SELF, 0.0f
      );
      animation.setDuration(500);
      set.addAnimation(animation);
    
      LayoutAnimationController controller =
          new LayoutAnimationController(set, 0.25f);
      button.setLayoutAnimation(controller);
    

    and then:

    public static Animation runSlideAnimationOn(Activity ctx, View target) {
      Animation animation = AnimationUtils.loadAnimation(ctx,
                                                         android.R.anim.slide_right);
      target.startAnimation(animation);
      return animation;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A project I'm working on at the moment involves refactoring a C# Com Object
The project is ASP.NET 2.0, I have never been able to reproduce this myself,
The project I'm working is using n-tier architecture. Our layers are as follows: Data
Project file here if you want to download: http://files.me.com/knyck2/918odc So I am working on
Project layout: /project_a /shared /project_b /shared /shared project_a and project_b both need to contain
The project I'm working on allows an end-user to modify CSS code to integrate
I project I have been working on has now been split between me and
A project I have been working on for the past year writes out log
I'm working on a project in C# w/ XNA, and I want to reorganize
My project is not running on xcode3.2 with ios SDK3.2 but working fine in

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.