Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Material Design in Android
Search
Esteban Dorado Roldan
May 12, 2015
Programming
0
230
Material Design in Android
Seminary "Material Design in Android" in University of Granada.
Esteban Dorado Roldan
May 12, 2015
Tweet
Share
More Decks by Esteban Dorado Roldan
See All by Esteban Dorado Roldan
Codemotion Spain Meetup -Microservices: gRPC vs Rest
mresti
0
260
PyConES2018: Python & gRPC, el conquistador de microservicios
mresti
0
480
Microservices: grpc vs rest
mresti
0
680
T3chFest 2018: Crea una API REST con Go
mresti
0
98
Build REST API with Golang
mresti
0
160
Firebase aventures - cloud based real time database
mresti
0
72
Material Design in Android
mresti
0
110
Android Wear
mresti
0
140
Android Wear
mresti
0
55
Other Decks in Programming
See All in Programming
CSC307 Lecture 02
javiergs
PRO
1
770
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
250
CSC307 Lecture 04
javiergs
PRO
0
660
SourceGeneratorのススメ
htkym
0
190
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
420
CSC307 Lecture 08
javiergs
PRO
0
670
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
170
MUSUBIXとは
nahisaho
0
130
組織で育むオブザーバビリティ
ryota_hnk
0
170
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
980
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
450
Featured
See All Featured
Utilizing Notion as your number one productivity tool
mfonobong
3
220
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
0
310
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Why Our Code Smells
bkeepers
PRO
340
58k
Mind Mapping
helmedeiros
PRO
0
78
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
0
270
Tell your own story through comics
letsgokoyo
1
800
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
320
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
Scaling GitHub
holman
464
140k
Transcript
Material Design In Android @Mr_Esti @Mr_Esti
Material Design implementing & compatibilizing - Concepts - Animations -
Style - Layout - Components - Patterns - Compatibility
None
Concepts Material is the metaphor
Print-like design
None
Constrained depth
None
<android.support.v7.widget.Toolbar android:layout_height="wrap_content" android:layout_width="match_parent" android:background="?android:colorPrimary" android:minHeight="?attr/actionBarSize" android:elevation="5dp" /> <android.support.v7.widget.CardView android:layout_width="100dp" android:layout_height=“96dp"
android:layout_gravity="center" android:stateListAnimator="@drawable/translation_selector" android:clickable=“true" android:elevation="2dp" card_view:cardCornerRadius="4dp" />
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true"> <set> <objectAnimator android:propertyName="translationZ" android:duration="@android:integer/config_shortAnimTime" android:valueTo="10dp" android:valueType="floatType"/>
</set> </item> <item android:state_pressed="false"> <set> <objectAnimator android:propertyName="translationZ" android:duration="@android:integer/config_shortAnimTime" android:valueTo="2dp" android:valueType="floatType"/> </set> </item> </selector>
None
None
Concepts Motion provides meaning
// After transition mFab.animate() .scaleX(1).scaleY(1) .start(); // After fab mToolbar.animate()
.scaleX(0).scaleY(1) .start(); // After toolbar mContent.animate() .scaleX(0).scaleY(1) .start();
None
// Slide awesomeTransition = new Slide (Gravity.BOTTOM); // Fade awesomeTransition
= new Fade (); Explode awesomeTransition = new Explode(); awesomeTransition.excludeTarget(android.R.id.navigationBarBackground, true); awesomeTransition.excludeTarget(android.R.id.statusBarBackground, true); awesomeTransition.excludeTarget(R.id.activity_transition_header, true); getWindow().setExitTransition(awesomeTransition); Slide Explode Fade
public void onFabPressed(View view) { Intent i = new Intent
(TransitionFirstActivity.this, TransitionSecondActivity.class); ActivityOptions transitionActivityOptions = ActivityOptions .makeSceneTransitionAnimation(mContext, Pair.create(mFabButton, "fab"), Pair.create(mHeader, "holder1")); startActivity(i, transitionActivityOptions.toBundle()); } <View ... android:transitionName="holder1" /> <Button ... android:transitionName=“fab" />
Concepts Bold, graphic, intentional
<style name=“AwesomeTheme" parent=“AppTheme"> <item name=“android:colorPrimary”>@color/my_primary</item> <item name=“android:colorAccent">@color/my_accent</item> </style> <style name=“AwesomeTheme"
parent=“AppTheme"> <item name=“colorPrimary”>@color/my_primary</item> <item name=“colorAccent">@color/my_accent</item> </style>
None
public class MovieDetailActivity extends Activity implements Palette.PaletteAsyncListener { ... @Override
public void onGenerated(Palette palette) { if (palette != null) { Palette.Swatch vibrantSwatch = palette .getVibrantSwatch(); Palette.Swatch darkVibrantSwatch = palette .getDarkVibrantSwatch(); Palette.Swatch lightSwatch = palette .getLightVibrantSwatch(); if (lightSwatch != null) { // awesome palette code } } } }
None
None
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { getWindow().setStatusBarColor(mAwesomeStatusColor); getWindow().setNavigationBarColor(mAwesomeNavColor); }
None
https://github.com/saulmm/Android-Material-Examples
https://github.com/saulmm/Curved-Fab-Reveal-Example
Practice on Paper
Further reading Support Libraries v22.1.0 https://chris.banes.me/2015/04/22/support-libraries-v22-1-0/ Material Design Guidelines http://www.google.com/design/spec/material-design/introduction.html
From Holo to Material http://novoda.com/blog/from-holo-to-material Paper prototyping https://www.youtube.com/watch?v=07xPF7L6klY From Material Design to Android Wear https://speakerdeck.com/saulmm/from-material-design-to-android-wear
None
Material Design
Holo App
RecyclerView API Documentation: “A Flexible view for providing a limited
window into a large data set”
RecyclerView API Recycler API: • Adapter • ViewHolder • Layaout
Manayer • Item Decoration • Item Animation
Adapter Recycler API: • Defines what gets displayed and how
one item is displayed • No default implementations • ViewHolder pattern
Adapter code
ViewHolder code
LayoutManager • Defines: The placement of items • One predefined
layoutmanager: LinearLayoutManager
Item Decorations • Defines how items are separated from each
other • No default implementation • Called once per onDraw()
Animations The ItemAnimator class: Defines the animations for addition, removal
or the moving of items
Examples: Animations
https://github.com/mresti/Materialize-Android-App/
Further reading A First Glance at Android’s RecyclerView http://www.grokkingandroid.com/first-glance-androids-recyclerview/ RecyclerView-Demo
https://github.com/saulmm/RecyclerView-demo
None