Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Android M
Search
Javier Gamarra
June 27, 2015
Programming
80
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Android M
Charla sobre novedades de Android M impartida en Cylicon Valley
Javier Gamarra
June 27, 2015
More Decks by Javier Gamarra
See All by Javier Gamarra
2000 katas later @cylicon
nhpatt
0
110
2000 katas later @CAS15
nhpatt
0
110
Métricas: lo bueno, lo feo y lo malo
nhpatt
0
250
Working Effectively with Legacy Code
nhpatt
0
440
Performance myths in android
nhpatt
2
320
How *not* to design an SDK
nhpatt
0
53
Angular2 @SC Toledo
nhpatt
0
65
Cambiar una empresa con juegos ágiles
nhpatt
0
260
RxJava in practice
nhpatt
1
340
Other Decks in Programming
See All in Programming
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
150
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
470
AIとGame Jamで、ゲームを完成させた話
takahirosaeki
0
120
AHC070解法紹介
eijirou
0
110
AIエージェント時代のコードレビューを設計する
nogu66
6
2.7k
AI Agent時代のリアーキテクチャ戦略と実践
hokaccha
9
4.2k
Go のフラットな パッケージに 「ファイル単位の private」を 〜Linter “declscope” を作った話〜
mpyw
0
130
技術的負債を組織課題として解く-増えすぎたマイクロサービスとの戦い-
reimaru
1
980
選挙速報を多くのユーザーへ 届ける Live Activities 設計
hamayokokuririn
0
130
ゲームコントローラやキーボードのファームウェアをSwiftで書く
kishikawakatsumi
1
230
初心者DevRelとして参加者だった私が、DevRel Talks!#2に登壇するまでにしてきたこと
sokohirai
0
370
変化を抱擁するドキュメントの作り方 - ビジネスルール駆動開発がもたらす、コードとの新しい関係
ioki
2
170
Featured
See All Featured
Practical Orchestrator
shlominoach
191
12k
My Coaching Mixtape
mlcsv
0
310
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Product Roadmaps are Hard
iamctodd
55
13k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
370
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
350
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
450
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
Designing Experiences People Love
moore
143
24k
The browser strikes back
jonoalderson
0
1.7k
From π to Pie charts
rasagy
0
360
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
410
Transcript
Android M @nhpatt / Javier Gamarra
@nhpatt / Javier Gamarra @liferay @agilecyl
Android?
Best improvement in M?
Best improvement in M • Design support library? • Data
binding?
What is the biggest problem developing with Android?
Android Problems • Fragmentation anyone? • Let`s talk about it…
• How many support libraries are there?
Design Support Library
Design Support Library Yet Another Support Library: compile 'com.android.support:design:22.2.0' Embeds
the normal support library
Design Support Library • Snackbar -> fixing toasts and “manual”
snackbars Snackbar.make(view, "Your message", LENGTH_SHORT) .setAction(getString(R.string.text_undo), this) .show();
Design Support Library • FAB -> replaces “manual” libraries <android.support.design.widget.FloatingActionButton
android:id="@+id/fab_normal" app:fabSize="normal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_plus" />
Design Support Library Customizable (size, tint, border, ripple…)
Design Support Library • TextInputLayout -> awesome fields with floating
hints and errors
Design Support Library <android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <EditText android:id="@+id/edit_text_email" android:layout_width="match_parent" android:layout_height="wrap_content"
android:inputType="textEmailAddress" android:hint="@string/hint_email" /> </android.support.design.widget.TextInputLayout>
Design Support Library And errors: setErrorEnabled(true); setError(getString(R.string.text_error_message));
Design Support Library • NavigationView replaces “manual” sidebar
Design Support Library <android.support.design.widget.NavigationView android:id="@+id/navigation_view" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="start" app:headerLayout="@layout/navigation_header" app:menu="@menu/drawer"
/>
Design Support Library We can group menu entries, change background,
capture click events...
Design Support Library • TabLayout -> tabs made easy <android.support.design.widget.TabLayout
android:id="@+id/sliding_tabs" android:layout_width="match_parent" android:layout_height="wrap_content" app:tabMode="fixed" app:tabGravity="fill" />
Design Support Library • TabMode • Listeners • Integration with
ViewPager • ...
Design Support Library • CoordinatorLayout & AppBarLayout -> automatic transitions
and integration with toolbar (or FAB…) • Scroll actions like enterAlways • Parallax effect
Design Support Library • Vector drawables (this is cool) ->
better shapes • Only on M • But easy to animate!
Design Support Library • And new support library version… ◦
colorPrimary <3 • And new play-services… • And support annotations ◦ (Null, resources, threading, permissions…)
Design support library Looks great but… bugs!
App Permissions
App permissions Now you have to be aware of the
permissions (and the chain of permissions!) • You define the permissions in the manifest (as always) • But there are NORMAL permissions and SPECIAL.
App permissions Permission is requested on first use for SPECIAL
permissions. • You have to check explicitly • You have to deal with revoking a permission ◦ Or the user deciding against granting it
App permissions Only for M targeted builds! <uses-permission-sdk-m> Build.VERSION Context.checkSelfPermission(permission_name)
Activity.requestPermissions(String[], int) public void onRequestPermissionsResult(...)
App permissions Reference
App Links
App links Allow registering your app as default handler (instead
of dialog) of links.
App links • Host a JSON, including your fingerprint •
And request the verification from your manifest Reference
Data binding
Data binding • Declarative layouts • Less code Yeah… but
why? Simple Example
Data binding <layout> <data> <variable name="movie" type="com.nhpatt.androidm.model.Movie" /> </data> <LinearLayout
...> <EditText android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{movie.title}" /> </LinearLayout> </layout>
Data binding ActivityBindingBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_binding); binding.setMovie(new Movie("Mad Max"));
Data binding Conditionals: android:visibility="@{movie.isNew ? View.VISIBLE : View.GONE}" Includes: <include
layout="@layout/name" bind:movie="@{movie}"/>
Data binding • Expression language! Like JSTL, JSF: concatenation, math
expressions, comparisons, casts, method calls… Except this, new and super.
Data binding New operators! ?? like || in JS android:text="@{movie.displayName
?? movie.title}"
Data binding NPE tolerant: @{movie.name} -> returns null if movie
is null
Data binding “Live” data binding with Observable Objects: • inherit
from BaseObservable • @Bindable in getter • notifyPropertyChanged in setter Or being a instance of ObservableField or ObservableArrayMap...
Data binding Lots of more stuff: • Converters • Custom
getters/setters • Dynamic binding • ... Reference
Direct share
Direct share Easy & powerful way of sharing :) But
only in M… (right now)
Backup & restore
Backup & restore • Google Drive • Every 24 hours
• Opt out • Don’t do it with the registrationId
Backup & restore Reference with the manifest and specify what
to save: android:fullBackupContent="@xml/mybackupscheme" <?xml version="1.0" encoding="utf-8"?> <full-backup-content> <exclude domain="database" path="device_info.db"/> </full-backup-content>
Backup & restore Testeable!: adb shell bmgr run Reference
And more things...
And more things... • Cloud test lab • Doze (testeable!)
• Now on tap • API device unlock • Developer page • Lots.
Not Android L but a lot of cool stuff
References • Good android guide • Exploring design support library
! • And another great one !
Android M @nhpatt / Javier Gamarra