material design for old schoolers
TRANSCRIPT
Material for old schoolers
Fernado Cejas - Souncloud aka Cejakas @fernando_cejas [email protected] +FernandoCejas
Jorge J. Barroso - Karumi aka Flipper83
@flipper83 [email protected]
+JorgeJBarroso
Styling Material
<style name="BaseAppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <item name="colorPrimary">@color/theme_default_primary</item> <item name="colorPrimaryDark">@color/theme_default_primary_dark</item> <item name="colorAccent">@color/theme_default_accent</item> <item name="colorControlHighlight">@color/theme_default_accent_light</item> </style>
Styling Materialvalues/themes.xml !
<style name="AppTheme" parent="BaseAppTheme"> </style> !
values-21/themes.xml !
<style name="AppTheme" parent="BaseAppTheme"> <item name="android:windowContentTransitions">true</item> <item name="android:windowAllowEnterTransitionOverlap">true</item> <item name="android:windowAllowReturnTransitionOverlap">true</item> </style>
com.android.support:recyclerview-v7
Bye Bye List view! Extends from RecyclerAdapter
ViewHolder by default Layout manager
com.android.support:recyclerview-v7
OnItemClick doesn’t exist any more, delegate click functionality
to view holders
Toolbar vs ActionBar
ToolBar is a viewGroup setSupportActionBar();
Extends from ActionBarActivity Deactivate ActionBar via Theme
VectorDrawable vs ‘Font as icon’
You can use icon fonts for reduce the number of assets on you app.
Keep performance!!! please!!
Transitions
ActivityOptionsCompat options = ActivityOptionsCompat. makeSceneTransitionAnimation((Activity) context, pairs); !
!
<style name="AppTheme" parent="BaseAppTheme"> <item name="android:windowContentTransitions">true</item> <item name="android:windowAllowEnterTransitionOverlap">true</item> <item name="android:windowAllowReturnTransitionOverlap">true</item> </style>
Bibliography
https://developer.android.com/training/material/compatibility.html http://android-developers.blogspot.de/2014/10/implementing-material-design-in-your.html
http://antonioleiva.com/material-design-everywhere/ http://www.slideshare.net/arueggeberg/material-design-and-backwards-compatibility
https://github.com/navasmdc/MaterialDesignLibrary https://github.com/markushi/android-ui
https://github.com/flipper83/transition-old-school