Questions tagged [viewanimator]

Base class to perform animations when switching between Android views.

Base class to perform animations when switching between Android views. Reference: https://developer.android.com/reference/android/widget/ViewAnimator.html

42 questions
150
votes
8 answers

ViewPager with previous and next page boundaries

I'm designing a view with multiple pages. I want edges of previous and next pages to be show like below and implement a 2 finger swipe to switch between pages. I tried using ViewPager with negative page margin as suggested here but that only shows…
Gaurav Arora
  • 17,124
  • 5
  • 33
  • 44
14
votes
3 answers

What is the current, new alternative to ViewAnimator?

Background I have been using ViewAnimator/ViewSwitcher for a long time. The most common use case I had was to switch from loading phase to content phase, or between phases of a wizard, and even having an error phase sometimes. The problem When I…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
13
votes
2 answers

Espresso test stuck/inactive after perform(click()) on button in ViewAnimator

Problem: I'm having an issue while running my Espresso test, after the perform(click()) method is called on the login button, the test keeps running but doesn't go any further until 45 seconds pass and the test automatically fails. Meanwhile, the…
8
votes
3 answers

Animation like switching accounts in Gmail App

Translate of clicked image to active account image and fade out active account image from its position fade in to place of clicked image.
7
votes
1 answer

Android ViewAnimator height changing base on child

By default, the max size of all children is used as the VeiwAnimator's layout size. How to create ViewAnimator, which height changes depending on the size of displaying child?
4
votes
1 answer

Difference between getAnimatedValue() and getAnimatedFraction()

Could anyone tell me the difference between the two methods getAnimatedValue() and getAnimatedFraction() used in android ValueAnimator?
Donny Dominic
  • 144
  • 1
  • 15
3
votes
2 answers

ViewAnimator's OnDraw throws NullPointerException if you remove child on onAnimationEnd

This is not a question, more like sharing with others a problem I encountered and how I resolved it. Basically, I was trying to create a ViewAnimator, who would create additional children in response to user clicks. To clean up after I have…
Mirbek Samiev
  • 67
  • 1
  • 7
3
votes
1 answer

Can't stop Animator in android after it began

I'm writing an app where I'm having some views in a RelativeLayout (in different positions, use margins) and I'm animating them using the new animation API in Honeycomb. The animations are repeating themselves but they need to wait some time between…
Elad92
  • 2,471
  • 4
  • 22
  • 36
3
votes
3 answers

Android ViewAnimator : animation while changing viewstub child

Here's my problem : I've got a ViewAnimator like :
3
votes
3 answers

Animate image icon from touch place to right-top corner?

I am working on Android onlineShopping application.I have to apply some animation. cart image is displays on Right-top corner of the screen. List of items are on screen each item with "Add to cart" button. When user press this button I have to play…
Biraj Zalavadia
  • 28,348
  • 10
  • 61
  • 77
3
votes
0 answers

Android view slide in from top to bottom

I want my view to perform a slide in top - slide out bottom. What I have so far is slide_in_top.xml
3
votes
1 answer

Android ViewAnimator and OutOfMemoryError

this is the situation: I have a ViewAnimator with three different layouts. Each layout have a different backgroundimage. For xhdpi devices, the images are 1280x800 px large and have a size of ~150KB. Now the problem: when I start the emulator with a…
Namenlos
  • 1,615
  • 2
  • 18
  • 24
2
votes
0 answers

Scrollview not scrolling to the bottom inside ViewAnimator

The view shown below belongs to a login and chat Fragment (probably a bad design idea, but works nicely for our purpose) the ScrollView inside the second LinearLayout scrolls when a new message is sent trough: scroll = (ScrollView)…
2
votes
0 answers

How to smooth animate between CardViews of different sizes?

Background I have only CardViews in a ViewAnimator (or anything else that would allow me to switch between CardViews), and I want to switch between them nicely, using scaling animation, so that it will look like a single CardView that changes its…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
2
votes
1 answer

Can not put ViewAnimator above a button in RelativeLayout

I am trying to put a ViewAnimator above a button in RelativeLayout but it does not let me. Here is the code:
mp3por
  • 1,796
  • 3
  • 23
  • 35
1
2 3