0

I am trying to create animation for a transition from splash screen to login screen. I want to create an animation in which a splash screen background image/Image view to go from full screen to half screen and other elements should come from the bottom with animation.

Splash screen to Login screen:

screens

Rambo772
  • 43
  • 2
  • 10
  • Have u tried a smart way?build the UI of the login activity such that the splash screen background covers half of the height of the activity and the other half is for login buttons..this way you can reduce efforts – Achy97 Aug 08 '18 at 14:26
  • @achy97 but that would not help me in animation. – Rambo772 Aug 08 '18 at 15:38
  • No you have to use bottom to up animation for this ..library is available in github.. let me give the library in the answer – Achy97 Aug 08 '18 at 15:40

2 Answers2

3

Try the smarter way ,build the UI of the login activity such that the splash screen background covers half of the height of the activity and the other half is for login buttons..this way you can reduce efforts.. now follow this answer to get the animation going to this link ->Bottom to up slide up

Now just combination of my trick and the pointed answer will get your job done.

Achy97
  • 994
  • 1
  • 14
  • 29
0

You can just paint your splash screen in green color, and after app navigate to login screen you just move the layout from first position (you have to set negative margin for the first position of layout and also you will have to set oval shape with the green color as a background of that layout) to some other position on y axis. Then or in the same time (I dont know exactly how you want that to looks like) you will change position (with animation) of the relative layout where you can put username and password fields. Animations will look great. Hope this help :)

C. Alen
  • 184
  • 1
  • 10
  • I can create a splash screen. I am just confused which animation should I use to achieve the animation I want? The top half part would ImageView and bottom would be some layout. But I am struggling to find out how can I animate ImageView to go from full screen to half screen smoothly and remain same? and use slide-up animation for bottom Layout. – Rambo772 Aug 08 '18 at 15:42
  • 1
    set first position to layout with green oval backround **layout.setScaleY(negativ value)**, and then just call **layout.animate().scaleYBy(positive value).start()**. Also you can set animation listener and on end of animation you start new animation with layout with username and password. – C. Alen Aug 09 '18 at 19:22