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
From Material Design to Android Wear
Search
Saul Molinero
March 20, 2015
Programming
5
620
From Material Design to Android Wear
These are the slides about the talk: 'From Material Design to Android Wear' at the RITSI event.
Saul Molinero
March 20, 2015
Tweet
Share
More Decks by Saul Molinero
See All by Saul Molinero
Hidden gems and wats for the Modern android Developer
saulmm
0
170
Hidden gems and wats for modern Android Development
saulmm
8
850
Android Dev Tools & Workflows
saulmm
3
440
Espresso Workshop, UI Testing en Android
saulmm
2
110
Android Dev Tools & Workflows
saulmm
0
210
Design & be reactive on Android with Iron Man in a clean way
saulmm
16
880
Tools & tips of the trade for the Android Developer
saulmm
31
5.8k
Android Wear vs. Tizen (Apr. 2015)
saulmm
3
1.3k
A glance to android wear
saulmm
3
280
Other Decks in Programming
See All in Programming
create_tableをしただけなのに〜囚われのuuid編〜
daisukeshinoku
0
240
短期間での新規プロダクト開発における「コスパの良い」Goのテスト戦略」 / kamakura.go
n3xem
2
170
これが俺の”自分戦略” プロセスを楽しんでいこう! - Developers CAREER Boost 2024
niftycorp
PRO
0
190
ブラウザ単体でmp4書き出すまで - muddy-web - 2024-12
yue4u
3
470
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
2
220
Effective Signals in Angular 19+: Rules and Helpers @ngbe2024
manfredsteyer
PRO
0
130
Zoneless Testing
rainerhahnekamp
0
120
Go の GC の不得意な部分を克服したい
taiyow
2
780
責務を分離するための例外設計 - PHPカンファレンス 2024
kajitack
1
650
Semantic Kernelのネイティブプラグインで知識拡張をしてみる
tomokusaba
0
180
生成AIでGitHubソースコード取得して仕様書を作成
shukob
0
350
なまけものオバケたち -PHP 8.4 に入った新機能の紹介-
tanakahisateru
1
120
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
137
6.7k
Imperfection Machines: The Place of Print at Facebook
scottboms
266
13k
Mobile First: as difficult as doing things right
swwweet
222
9k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
520
A better future with KSS
kneath
238
17k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
111
49k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Transcript
From Material Design to android wear @_saulmm @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
android wear all you need to be a fancy wear
developer - Concepts - Environment - Notification API - Wearable apps - Node Api - Message Api - Watchfaces @Mr_esti
Concepts @Mr_esti
Real life Get phone Use phone @Mr_esti
Five seconds per interaction Wear @Mr_esti
All in a glance…
@Mr_esti
Conectivity
!= @Mr_esti
What is not an android wear
@Mr_esti
Smartwatchs?
Unsupported APIs - android.webkit - android.print - android.app.backup android.appwidget -
android.hardware.usb
@_saulmm Environment
Demo Connecting to wear
Notifications Apps
https://github.com/saulmm/android-wear-basics
Demo Enriched notifications
@_saulmm Don’t stop the user Design for big gestures Design
principles
@_saulmm UX
BoxInsetLayout CardFragment CircledImageView ConfirmationActivity DismissOverlayView GridViewPager GridPagerAdapter FragmentGridPagerAdapter WatchViewSub User
interface widgets
Demo User interface
@_saulmm Installation
Structure mobile / build.gradle @_saulmm
@_saulmm Wearable.{wear_api}.addListener(mGoogleApiClient, this); WearableListenerService
Node NodeApi @_saulmm
Message Api, send Message @_saulmm
Message Api, receive Message @_saulmm
Node Data Message Watchface @_saulmm
Data Watch faces assets & data @_saulmm
https://github.com/saulmm
Useful resources Introduction to Android Wear - Cyril Mottier https://speakerdeck.com/cyrilmottier/introduction-to-android-wear-a-glimpse-into-the-future
Building apps for wearables - Android developers https://developer.android.com/training/building-wearables.html Android wear developers - Google+ Community https://plus.google.com/u/0/communities/113381227473021565406 @_saulmm
None