How fixed position of element after applying animation

Denys Karpov

Have problem: don't know how to apply new position to element after animation (applyd to this element) For example have .xml animation

<translate
    android:duration="6000"
    android:fromXDelta="1000"
    android:toXDelta="720" 
    />

of translation and after applyin it for my button button.setAnimation(translate), button back to previous position. How apply new position to button(actually the position when animation finish).

Tran Hieu

You should try with fillEnabled=true & fillAfter=true, as below:

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
        android:interpolator="@android:anim/decelerate_interpolator"
        android:fillEnabled="true"
        android:fillAfter="true"
        android:zAdjustment="top">
    <translate
    android:duration="6000"
    android:fromXDelta="1000"
    android:toXDelta="720" 
    />
</set>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to position a relative element after a fixed element

From Dev

jquery how to make an element comeback to initial position after animation

From Dev

How to get the position of an element after css animation (vanilla js)

From Dev

After adding animation property, element position is changing

From Dev

element.animate, applying style changes after the animation is finished

From Dev

element.animate, applying style changes after the animation is finished

From Dev

scrollr.js animation happens on element only with position fixed

From Dev

How make a fixed element be on top of another position fixed element

From Dev

How to animate a position of a fixed element with jQuery

From Dev

How to position a html element under a fixed div

From Dev

How to Stop Jumping Position fixed element on scrolling

From Dev

How to have fixed position of element but relative to container

From Dev

How to Stop Jumping Position fixed element on scrolling

From Dev

How to position element as fixed in relatively positioned container?

From Dev

How to remove a element after animation?

From Dev

How to make element instantly go back to initial position after CSS animation end?

From Dev

how to change element CSS position with animation

From Dev

how to change element CSS position with animation

From Dev

How to position a child element at the bottom of a fixed position parent

From Dev

How does margin of separate element affect position of fixed element?

From Dev

How does margin of separate element affect position of fixed element?

From Dev

position:fixed messing with keyframes animation

From Dev

Applying `position: fixed` to `body` makes it lose the scrollbars

From Dev

Position a fixed element below another fixed element

From Dev

Fixed position element inside absolute position element

From Dev

Fixed position element inside absolute position element

From Dev

how to hide svg element after animation

From Java

How can I have a position: fixed; behaviour for a flexbox sized element?

From Dev

How to set a div percentage width with a fixed position based on the parent element

Related Related

  1. 1

    How to position a relative element after a fixed element

  2. 2

    jquery how to make an element comeback to initial position after animation

  3. 3

    How to get the position of an element after css animation (vanilla js)

  4. 4

    After adding animation property, element position is changing

  5. 5

    element.animate, applying style changes after the animation is finished

  6. 6

    element.animate, applying style changes after the animation is finished

  7. 7

    scrollr.js animation happens on element only with position fixed

  8. 8

    How make a fixed element be on top of another position fixed element

  9. 9

    How to animate a position of a fixed element with jQuery

  10. 10

    How to position a html element under a fixed div

  11. 11

    How to Stop Jumping Position fixed element on scrolling

  12. 12

    How to have fixed position of element but relative to container

  13. 13

    How to Stop Jumping Position fixed element on scrolling

  14. 14

    How to position element as fixed in relatively positioned container?

  15. 15

    How to remove a element after animation?

  16. 16

    How to make element instantly go back to initial position after CSS animation end?

  17. 17

    how to change element CSS position with animation

  18. 18

    how to change element CSS position with animation

  19. 19

    How to position a child element at the bottom of a fixed position parent

  20. 20

    How does margin of separate element affect position of fixed element?

  21. 21

    How does margin of separate element affect position of fixed element?

  22. 22

    position:fixed messing with keyframes animation

  23. 23

    Applying `position: fixed` to `body` makes it lose the scrollbars

  24. 24

    Position a fixed element below another fixed element

  25. 25

    Fixed position element inside absolute position element

  26. 26

    Fixed position element inside absolute position element

  27. 27

    how to hide svg element after animation

  28. 28

    How can I have a position: fixed; behaviour for a flexbox sized element?

  29. 29

    How to set a div percentage width with a fixed position based on the parent element

HotTag

Archive