Questions tagged [animation]

Animation is the rapid display of a sequence of visuals in order to create an illusion of movement or change.

Animation is the rapid display of a sequence of visuals in order to create an illusion of movement or change. The elements of animation are typically images or mathematical renderings. Animation effects can be 2D or 3D.

The most common method of presenting animation is as a motion picture or video program, although there are other methods. This type of presentation is usually accomplished with a camera and a projector or a computer viewing screen which can rapidly cycle through images in a sequence. Animation can be made with either hand-rendered art, computer-generated imagery, or three-dimensional objects, e.g., puppets or clay figures, or a combination of techniques. The position of each object in any particular image relates to the position of that object in the previous and following images so that the objects each appear to fluidly move independently of one another. The viewing device displays these images in rapid succession, usually 24, 25, or 30 frames per second.

44523 questions
76
votes
5 answers

Circular reveal transition for new activity

As per https://developer.android.com/training/material/animations.html The ViewAnimationUtils.createCircularReveal() method enables you to animate a clipping circle to reveal or hide a view. To reveal a previously invisible view using this…
Ishaan Garg
  • 3,014
  • 3
  • 25
  • 28
76
votes
9 answers

Animating UILabel Font Size Change

I am currently making an application that uses a custom View Controller container. Multiple views are on the screen at one time and when one is tapped, the selected view controller animates to full screen. In doing so, the selected view controllers…
morcutt
  • 3,739
  • 8
  • 30
  • 47
75
votes
7 answers

Change ViewPager animation duration when sliding programmatically

I'm changing slide with the following code: viewPager.setCurrentItem(index++, true); But it changes too fast. Is there a way to set manually the animation speed?
User
  • 31,811
  • 40
  • 131
  • 232
73
votes
15 answers

How to rotate image in Swift?

I am unable to rotate the image by 90 degrees in swift. I have written below code but there is an error and doesn't compile func imageRotatedByDegrees(oldImage: UIImage, deg degrees: CGFloat) -> UIImage { //Calculate the size of the rotated…
TechChain
  • 8,404
  • 29
  • 103
  • 228
72
votes
6 answers

CSS Auto hide elements after 5 seconds

Is it possible to hide element 5 seconds after the page load? I know there is a jQuery solution. I want to do exactly same thing, but hoping to get the same result with CSS transition. Any innovative idea? Or am I asking beyond the limit of css…
Alfred
  • 1,023
  • 2
  • 9
  • 13
72
votes
5 answers

Disabling animation in ViewPager

I'd like to disable all the animations for the transitions in my custom ViewPager. This view pager contains four tabs -and each tab loads a Fragment- and what the view pager does is to switch the tabs: for example first tab is the index, second is…
noloman
  • 11,411
  • 20
  • 82
  • 129
71
votes
11 answers

CSS Animation onClick

How can I get a CSS Animation to play with a JavaScript onClick? I currently have: .classname { -webkit-animation-name: cssAnimation; -webkit-animation-duration:3s; -webkit-animation-iteration-count: 1; -webkit-animation-timing-function:…
tekknolagi
  • 10,663
  • 24
  • 75
  • 119
70
votes
12 answers

android animation is not finished in onAnimationEnd

It seems that an android animation is not truly finished when the onAnimationEnd event is fired although animation.hasEnded is set to true. I want my view to change it's background drawable on the end of it's ScaleAnimation which it does, but you…
ShadowMare
  • 2,087
  • 2
  • 25
  • 27
69
votes
5 answers

Set default page for ViewPager in Android

I am using the following code, MAX is 2 pages. By default the position is 0 and adds a new page to the right. I inflate two layout files. How can I show the page1 when the app starts and add a new page to the left ? Thanks. main.xml
dcanh121
  • 4,665
  • 11
  • 37
  • 84
69
votes
6 answers

How do you animate the height in react native when you don't know the size of the content?

In react-native, how do you animate the size of a View when you dont know the size of it's contents? Let's say the View's content height can be anywhere from 0-400pts, and the content can grow and shrink dynamically, and you want to animate any…
Poyan
  • 6,243
  • 6
  • 28
  • 30
69
votes
8 answers

Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?

MY ENVIRONMENT (WHERE I GET THE LAG): Mac OSX El Capitan 10.11.2 on Chrome Version 50.0.2661.102 (64-bit) CODEPEN: http://codepen.io/vieron/pen/hnEev ANIMATION: SITUATION: I googled this a lot without finding anything that works for me. I know…
Coder1000
  • 4,071
  • 9
  • 35
  • 84
68
votes
6 answers

Why doesn't setVisibility work after a view is animated?

Why doesn't the textView become invisible? Here is my layout xml:
ZippyFerguson
  • 889
  • 1
  • 7
  • 8
68
votes
9 answers

How to implement ItemAnimator of RecyclerView to disable the animation of notifyItemChanged

In my project I need disable the "change" animation of RecyclerView while notifyItemChanged. I investigated in the source of RecyclerView and had overridden android.support.v7.widget.DefaultItemAnimator as below: private static class ItemAnimator…
Kenny
  • 1,901
  • 2
  • 11
  • 8
68
votes
6 answers

Android View Disappearing When Go Outside Of Parent

I have a LinearLayout and ImageView inside this LinearLayout. There is a translation effect for ImageView. // v = ImageView ObjectAnimator animation2 = ObjectAnimator.ofFloat(v, "translationY", 200); …
Eray
  • 7,038
  • 16
  • 70
  • 120
66
votes
6 answers

Android -- How to position View off-screen?

I'm trying to animate a simple ImageView in my application and I want it to slide in from the bottom of the screen and come to a resting position where the top 50px of the view is off the top of the screen (e.g. the final position of the ImageView…
RyanM
  • 5,680
  • 9
  • 45
  • 55