Questions tagged [android-animation]

Animations can be integrated into Android Apps, through both Java and XML.

Android animations can use a few default interpolators (these specify whether the animation goes at the same speed, or, for example, speeds up or slows down), and custom ones can be created.

Android Animation Reference

5379 questions
346
votes
17 answers

Show and hide a View with a slide up/down animation

I have a LinearLayout that I want to show or hide with an Animation that pushes the layout upwards or downwards whenever I change its visibility. I've seen a few samples out there but none of them suit my needs. I have created two xml files for the…
MichelReap
  • 4,940
  • 8
  • 30
  • 80
287
votes
8 answers

Android adding simple animations while setvisibility(view.Gone)

I have designed a simple layout.I have finished the design without animation, but now I want to add animations when textview click event and I don't know how to use it. Did my xml design looks good or not? Any suggestions would be appreciated. My…
arun
  • 2,917
  • 3
  • 11
  • 9
160
votes
3 answers

How do android screen coordinates work?

I am working with Android Animation and I have found the Android coordinate system to be quite confusing so I am here to ask this question about how coordinates work in Android. I am following this image for moving one view to another but it seems…
Yasir Khan
  • 2,263
  • 4
  • 17
  • 26
130
votes
6 answers

Complete Working Sample of the Gmail Three-Fragment Animation Scenario?

TL;DR: I am looking for a complete working sample of what I'll refer to as "the Gmail three-fragment animation" scenario. Specifically, we want to start with two fragments, like this: Upon some UI event (e.g., tapping on something in Fragment B),…
CommonsWare
  • 910,778
  • 176
  • 2,215
  • 2,253
120
votes
6 answers

Adding Ripple Effect to RecyclerView item

I am trying to add Ripple Effect to RecyclerView's item. I had a look online, but could not find what I need. I assume it has to be a custom effect. I have tried android:background attribute to the RecyclerView itself and set it to…
Georgi Koemdzhiev
  • 9,882
  • 11
  • 51
  • 101
115
votes
6 answers

How to Reverse Fragment Animations on BackStack?

I thought the system would reverse animations on the backstack when the back button is pressed when using fragments using the following code: FragmentManager fm = getFragmentManager(); FragmentTransaction ft =…
user742030
100
votes
10 answers

Show DialogFragment with animation growing from a point

I'm showing a DialogFragment when the user taps on a row in a ListView. I'd like to animate the showing of the dialog so that it grows from the center of the row. A similar effect can be seen when opening a folder from the launcher. One idea that…
Edward Dale
  • 28,070
  • 11
  • 84
  • 128
95
votes
1 answer

swap fragment in an activity via animation

I want to swap two fragment in an activity via animation.Suppose PageA is for fragement A and left side on the screen and PageB is for fragment B i.e. on the right side of the screen. Now i want that when i click a button on pageA then PageA will…
Deepak Goel
  • 5,278
  • 5
  • 36
  • 50
95
votes
4 answers

Android image scale animation relative to center point

I have an ImageView and I do a simple scale animation to it. Very standard code. My scale_up.xml:
Tomislav Markovski
  • 11,818
  • 4
  • 43
  • 69
93
votes
5 answers

End animation event android

I have a fadeout animation in a view (which is inside a fragment), and everytime the animation happens, after it finishes the view redraws itself again. I found a work around doing view.SetVisibility(View.GONE) . But it doesn't wait for the…
Paulo Barros
  • 2,600
  • 7
  • 24
  • 35
91
votes
7 answers

Animated Icon for ActionItem

I have been searching everywhere for a proper solution to my problem and I can't seem to find one yet. I have an ActionBar (ActionBarSherlock) with a menu that is inflated from an XML file and that menu contains one item and that one item is shown…
Alex Fu
  • 5,401
  • 3
  • 29
  • 40
89
votes
14 answers

shaking / wobble view animation in android

I created an anim.xml file such as below to shake imageview like IOS icon shaking in android. However it does not provide me same result. Is there any better idea?
Winston
  • 1,650
  • 2
  • 18
  • 29
83
votes
5 answers

Android - Custom Animation on fragment transaction not running

I'm using Google API 8 (Android 2.2) with support package v4. It doesn't give any error or animation. Transaction: FragmentTransaction transaction = manager.beginTransaction(); transaction.replace(R.id.content,…
adheus
  • 3,827
  • 2
  • 17
  • 32
81
votes
9 answers

Android: show/hide a view using an animation

I've been looking through many google results / questions on here to determine how to show/hide a view via a vertical animation, but I can't seem to find one that's exactly right or not too vague. I have a layout (undo bar) that's below another…
77
votes
12 answers

FragmentTransaction animation to slide in over top

I am trying to achieve the following effect using FragmentTransaction.setCustomAnimations. Fragment A is showing Replace Fragment A with Fragment B. Fragment A should remain visible during the replacement. Fragment B should slide in from the…
Matt Accola
  • 3,980
  • 4
  • 26
  • 37
1
2 3
99 100