Material Design for Old Schoolers

22
Material for old schoolers Fernado Cejas - Souncloud aka Cejakas @fernando_cejas [email protected] +FernandoCejas Jorge J. Barroso - Karumi aka Flipper83 @flipper83 [email protected] +JorgeJBarroso

Transcript of Material Design for Old Schoolers

Material for old schoolers

Fernado Cejas - Souncloud aka Cejakas @fernando_cejas [email protected] +FernandoCejas

Jorge J. Barroso - Karumi aka Flipper83

@flipper83 [email protected]

+JorgeJBarroso

Material is cool

What happens with old schoolers

What google provides?

com.android.support:appcompat-v7

Themes ActionBar and ToolBar

Transitions Widget Tinting

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>

Be careful with some Samsung devices

Proguard to the rescue!!!

Tint doesn’t work on custom views!!

com.android.support:recyclerview-v7

Bye Bye List view! Extends from RecyclerAdapter

ViewHolder by default Layout manager

com.android.support:recyclerview-v7

Change your dividers for ItemDecoration

com.android.support:recyclerview-v7

Change your headers and footers for ItemTypes.

com.android.support:recyclerview-v7

OnItemClick doesn’t exist any more, delegate click functionality

to view holders

com.android.support:recyclerview-v7

Add animations with ItemAnimator, it’s easy and it’s

cool.

com.android.support:cardview-v7

com.android.support:palette-v7

Only in compat Check null

Problems with some images

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

Q&A