My Hexaville
Spead the Word
android login screen animations update

Android Login Screen Animations Update


A while ago I put out an implementation of one cool login scrren design. It was a quick mock implementation, but I saw some people actually wanting to use it, so here’re few updates to make it at least somehow usable

 

 

So here’s what it looks like now

 

Even though it looks great, under the hood it’s still ugly as hell. I went with fragment solution to make it more or less clean, but in order to make animation smooth, I had to create 4 fragments 2 real at the bottom, for login/sign up and 2 duplicated for animation, which are hidden after it’s done. I could use 3 (only one on top), but it would envolve more code

Using 2 fragments is possible, but it would require to reinstantiate fragments and replace them with fragment manager on each change.

I could also try ViewPager with page transformer, to see what I can achieve with it. Or scene transitions, but it would require probably 4 fragments again, so there isn’t much difference

Updates

So now all inputs work as expected and touch input works for buttons as well, before you could click anywhere to switch fragments

Here’s another ugly handling for it. My LoginButton takes the whole screen, so depending on the touch coordinates – it should ether handle it or pass through, for Login/SignUp fragments to handle

Submit

Now I was thinking whether to put a submit button in each fragment or use large texts as submit button. Decided to go with the last one. And sice these texts come from buttons – I have them in LoginButton, so login button should handle clicks and deleagte it to fragments. Again, this design isn’t neccesary, having a submit button in fragments would elimitate this

And that’s it for now. You can get the source code here. This is probably the worst code I’ve ever written, but you can have fun with it now if you want. There’re several bugs, and it’s pretty hardcoded about layout positioning

 

Don’t forget to subscribe, follow me on Twitter, Facebook, G+ if you want to get the latest updates from me!


About the Author Ihor Klimov

Formerly an Android developer, lately picked up some Flutter. This blog is everything that I find exciting about Android and Flutter development. Stay tuned and hope to see you again!

>