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

Material for old school

Embed Size (px)

Citation preview

Page 1: Material for old school

Material for old schoolers

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

Jorge J. Barroso - Karumi aka Flipper83

@flipper83 [email protected]

+JorgeJBarroso

Page 2: Material for old school

Material is cool

Page 3: Material for old school

What happens with old schoolers

Page 4: Material for old school

What google provides?

Page 5: Material for old school

com.android.support:appcompat-v7

Themes ActionBar and ToolBar

Transitions Widget Tinting

Page 6: Material for old school

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>

Page 7: Material for old school

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>

Page 8: Material for old school

Be careful with some Samsung devices

Proguard to the rescue!!!

Page 9: Material for old school

Tint doesn’t work on custom views!!

Page 10: Material for old school

com.android.support:recyclerview-v7

Bye Bye List view! Extends from RecyclerAdapter

ViewHolder by default Layout manager

Page 11: Material for old school

com.android.support:recyclerview-v7

Change your dividers for ItemDecoration

Page 12: Material for old school

com.android.support:recyclerview-v7

Change your headers and footers for ItemTypes.

Page 13: Material for old school

com.android.support:recyclerview-v7

OnItemClick doesn’t exist any more, delegate click functionality

to view holders

Page 14: Material for old school

com.android.support:recyclerview-v7

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

cool.

Page 15: Material for old school

com.android.support:cardview-v7

Page 16: Material for old school

com.android.support:palette-v7

Only in compat Check null

Problems with some images

Page 17: Material for old school

Toolbar vs ActionBar

ToolBar is a viewGroup setSupportActionBar();

Extends from ActionBarActivity Deactivate ActionBar via Theme

Page 18: Material for old school

VectorDrawable vs ‘Font as icon’

You can use icon fonts for reduce the number of assets on you app.

Keep performance!!! please!!

Page 19: Material for old school

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>

Page 20: Material for old school
Page 21: Material for old school

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

Page 22: Material for old school

Q&A