3 ms·
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
by AReallyGoodName 10y ago
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.
It's a general problem in the Android world. Some things can only be done as an activity whilst others as fragments.
In fact this is a problem even on Googles own apps. Right now if i tap things in the nav panel of the Gmail app it's a crap shoot whether i open a fragment or activity. Things like inbox/sent are loaded as fragments. Things like settings are loaded as activities with a completely different loading in animation. Help is different again. Lots of different ways of loading in a view all coming from options in the same menu. It's pretty fucked up form a UI perspective.
- saturn_vk 10y ago> 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.
- gagege 10y agoThere are benefits other than cross-platform development to using web views or React Native or something that gets rid of the Android guts.
- AReallyGoodName 10y agoWell 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.