transition animation between two activity android - android

I need animation like this image
I want to create transition animation as per below requirement:
1) old screen move right to left.
2) New screen need to be appear as it is without any animation.
So while activity transist that time only old screen move but new screen need to appear without any alpha effect.
Currenly I have created similar animation but when activity transist it has alpha effect. but I dont want alpha animation.

Related

Create a transparent expanding circle transition animation from one layout to another on swipe

When the user holds down on the screen, it should become transparent by their finger so that they can see the other layout beneath. When they continue holding down their finger and swipe, I'd like to create a transition where the transparency spreads outward from their initial holding location until the upper layout is gone and only the layout underneath is left.
Here are examples of the effect I'm looking to create:
I'm not concerned about the fancy movement of the purple / red squares; I'm just looking to find out how to create the swipe transition between the two layouts.
It seems like using android.R.anim.fade_in and android.R.anim.fade_out would get close to the desired effect but it would be missing the expanding circle centered on the user's finger and the transition would happen all at once instead of the intended effect of giving a peak when just held down and performing the transition only after a swipe.
you can use this npm
react-native-expanding-circle-transition
https://github.com/alexbrillant/react-native-expanding-circle-transition

Android CircularFloatingActionMenu SlideDown

I am using this: CircularFloatingActionMenu
I have been able to use it so far pretty well. I am able to move it to desired positions as described in the ReadMe and even set rotation, theme coloring etc. My problem is I am trying to create a custom animation so that when placed in the upper right the icons shoot downwards. I kind of cheated and got it to appear to work by setting the start/end angle at 89 and 90 degrees so instead of being in a line they are just slightly off, but my problem is that when the animation finishes the final position ends up stacking all the icons on top of one another. I have attached screenshot demonstrating this.
Ive called my SlideDownAnimationHandler.java class as such:
FloatingActionMenu actionMenuTopRight = new FloatingActionMenu.Builder(this)
.setStartAngle(89)
.setEndAngle(90)
.setAnimationHandler(new SlideDownAnimationHandler())
.addSubActionView(rLSubBuilder.setContentView(rlIcon1).build())
.addSubActionView(rLSubBuilder.setContentView(rlIcon2).build())
.addSubActionView(rLSubBuilder.setContentView(rlIcon3).build())
//.addSubActionView(rLSubBuilder.setContentView(rlIcon4).build())
//.addSubActionView(rLSubBuilder.setContentView(rlIcon5).build())
.attachTo(darkButton)
.build();
I don't really want to post the SlideDownAnimationHandler.java classify as it is quite large (~100 lines of code). I'm wondering if theres a better way to properly animate the slide down effect, and also how to set their final position in a similar fashion to how i set the y translation in the animation itself.

How to deal with overlapping RotateAnimation-s on Android?

I am using RotateAnimation to animate pointing arrow that updates its position when of user updates destination point or current device position changes. I'm using interpolator.accelerate_decelerate to make animation look more smooth and "physical".
Everything goes fine until another update arrives when current animation is still processing, for example, when user changes destination while pointing arrow is still rotating. When such happens, the arrow makes a sharp bounce which looks ugly, and I'm trying to avoid this. I tried to implement a queue to make every next animation wait until previous ends and it looks nice, but behavior became quite illogical.
So my questions are following:
1) is there some way to make animated transitions more smooth in the cases when animations start one by one and overlap each other?
2) is there a way to stop animation that is currently processing and get intermediate position of an object?--if I decide to stop animation before its end and use current position as starting point for next animation.
ok so the easiest is to create a custom Animation similar to RotateAnimation and saving the current rotation angle in applyTransformation, this angle can be then used as a start angle for next Animation thus avoiding the "jumps"
A custom class extending ImageView that performs animation based on angular movement of dipole in magnetic field:
https://stackoverflow.com/a/22738030/3459206

Moving imageview from top to bottom in android

I Have an ImageView in Center of my Screen, which i want to move up. where it remains at the Top.
I saw Tween Animation Documents and Tried it But Its Not Working.
Can any one Plz help me out solving this issue.
did you tried view animation?
Animation an = new TranslateAnimation(fromX,fromY,toX,toY);//0,0 is the current coordinates
an.setFillAfter(true);// to keep the state after animation is finished
yourView.startAnimation(an);// to start animation obviously
to make it move from bottom to top, get screen height and use it to set "toY" parameter.
after few tries you will sure do it.

Android: overridePendingTransition Animation Background Color

Trying to use overridePendingTransition to apply custom animations to my activity changes. The problem is that my themed app uses colored backgrounds in the activities, and while animating a black background is visible while one view scales out and another scales in.
I would like to know if it is possible to specify the default background color here, and also if I can make it skinnable.
Any help would be greatly appreciated.
Thanks,
Josh
The animations you supply are only window animations -- they describe how to move the entire window/activity surfaces. There is no concept of a background or other such thing, just 2d transformations (and alpha fades) being applied to the entire window surface.
Further, you need to be careful when creating such animations that when you put them together the two windows are always entirely covering the screen, because there is nothing behind your application to provide a background. Thus any such animation typically needs to involve one of the windows remaining opaque if another is fading, and if they are moving they need to do so in a way that the always cover the screen as it done with the default slide left/right animation.

Categories

Resources