Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> There's a few issues with this though. Take various animations such as the one on the toolbar that some Google apps have (the arrow that spins into a hamburger and back again). Easy to do if you're just loading different fragments into a Framelayout, impossible to do with activities as you reload the entire toolbar on an activity change.

I haven't even found an easy way to control the state of that animation, even if I use only one activity.



Well it's easy enough to transition into arrow and hamburger

ObjectAnimator arrowRotateAnim = ObjectAnimator.ofFloat(mDrawerArrowDrawable, "progress", 0.0f, 1.0f);

arrowRotateAnim.setDuration(Constant.NAV_ARROW_TIME);

arrowRotateAnim.start();

and vice versa on progress where mArrowDrawable is a DrawerArrowDrawable object. I set NAV_ARROW_TIME to 300 and it seems the same as what google has.


There are benefits other than cross-platform development to using web views or React Native or something that gets rid of the Android guts.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: