vpaliy / android-login

MIT License
324 stars 114 forks source link

Weird issue with the lock #5

Open NeoDigi opened 7 years ago

NeoDigi commented 7 years ago

There is still one weird issue left: When you first start the app, if you push anywhere on the app except on the edit Text or the switch screen textview) there is a weird animation happening that will only happen once (try to click on the background or on the LOG IN button before clicking anything else)

I think the because the lock is initially at false. I tried to debug it, but I still don't understand how the lock value is false only when you click the caption and try when you click anything else (I've put a breakpoint on any value change on the lock, and I still don't understand how it's changing its value without hitting that breakpoint)

luckyzhangx commented 6 years ago

when unfold() is called, lock would be set true. However, when you launch app, unfold is not called in the onCreateView. As a result, when touch somewhere outside of textViews, LogInFragment's unfold() will be called, which will call SignUpFragment's fold(), which will do the weird fold animation.

put lock = true; in the onViewCreated() of LogInFragment will solve this problem.