I am trying to understand what animation is used in the Google Maps application.
The part I am trying to understand is when you click on the textbox in the toolbar. The layout animates to present a completely new screen with a few items sliding in from the bottom.
How is this done? Is it a bottom sheet becoming visible? Is it a new activity with shared element transitions?
Google Maps provides 3D maps of the entire planet. Manipulating a 3D map can be pretty graphics intensive, however, so the default mode is usually 2D. If you want to view your maps in 3D, here's what you'll need to do.
Google Maps works with 1,000 third party sources from around the world to collect the data necessary to create accurate maps. Plus, governments can upload data directly to Google Maps, meaning the information you see is constantly updated.
That is called activity transitions. Where you choose which layouts should been moved to a second activity. See also the official documentation about animations: http://developer.android.com/training/material/animations.html#Transitions
Another good point to start it the video talk from the Google Developers: https://www.youtube.com/watch?v=RhiPJByIMrM
Basically you need to modify the style like here:
<style name="BaseAppTheme" parent="android:Theme.Material">
<!-- enable window content transitions -->
<item name="android:android:windowActivityTransitions">true</item>
<!-- specify enter and exit transitions -->
<item name="android:windowEnterTransition">@transition/explode</item>
<item name="android:windowExitTransition">@transition/explode</item>
<!-- specify shared element transitions -->
<item name="android:windowSharedElementEnterTransition">
@transition/change_image_transform</item>
<item name="android:windowSharedElementExitTransition">
@transition/change_image_transform</item>
</style>
You also need to specify a special attribute called android:transitionName
to say the system that you want to move that from one activity to a second one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With