Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
A slice of Android Slices - droidcon London 2018
Search
Adnan A M
October 26, 2018
Programming
0
110
A slice of Android Slices - droidcon London 2018
Slides for my talk at droidcon London 2018.
Adnan A M
October 26, 2018
Tweet
Share
More Decks by Adnan A M
See All by Adnan A M
Abridge Coding Guidelines
adnan321
0
54
A developer's guide to wealth
adnan321
0
260
What the Hook ?
adnan321
0
89
Scoping Your Storage
adnan321
2
160
What The Context ?
adnan321
2
220
Putting Work Manager To Work
adnan321
0
100
OOP To FP
adnan321
1
210
Putting Work Manager To Work
adnan321
1
170
Having fun with Kotlin fun()
adnan321
0
96
Other Decks in Programming
See All in Programming
FluorTracer / RayTracingCamp11
kugimasa
0
180
関数の挙動書き換える
takatofukui
4
770
TypeScriptで設計する 堅牢さとUXを両立した非同期ワークフローの実現
moeka__c
6
2.9k
Media Capture and Streams: W3C仕様と現場での知見
nowaki28
0
130
WebRTC、 綺麗に見るか滑らかに見るか
sublimer
1
140
関数実行の裏側では何が起きているのか?
minop1205
1
480
著者と進める!『AIと個人開発したくなったらまずCursorで要件定義だ!』
yasunacoffee
0
110
複数人でのCLI/Infrastructure as Codeの暮らしを良くする
shmokmt
5
2.1k
Level up your Gemini CLI - D&D Style!
palladius
1
160
ViewファーストなRailsアプリ開発のたのしさ
sugiwe
0
380
モダンJSフレームワークのビルドプロセス 〜なぜReactは503行、Svelteは12行なのか〜
fuuki12
0
180
Reactive Thinking with Signals and the new Resource API
manfredsteyer
PRO
0
160
Featured
See All Featured
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.3k
How to Think Like a Performance Engineer
csswizardry
28
2.3k
Designing for Performance
lara
610
69k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
A designer walks into a library…
pauljervisheath
210
24k
4 Signs Your Business is Dying
shpigford
186
22k
Why You Should Never Use an ORM
jnunemaker
PRO
60
9.6k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
A Modern Web Designer's Workflow
chriscoyier
697
190k
Transcript
A Slice of Android Slices Adnan A M
What are Android Slices ? ◎ Small Interactable UI elements
◎ Fancy Content Providers ◎ Remote Content Views -Widgets
Why should you have a Slice ? ◎ Interactable ◎
Dynamic/Updatable ◎ Supports API 19(Kitkat) - Yaaay
The Life Of A Slice
Building Your First Slice ◎ Add Dependencies dependencies { //
... implementation "androidx.slice:slice-builders-ktx:(ver)" // ... }
Building Your First Slice ◎ Extend Slice Provider class class
CoffeeSliceProvider: SliceProvider() { .. .. }
Building Your First Slice ◎ Register the Fancy Content Provider
Building Your First Slice ◎ onCreateSliceProvider() - Cp.onCreate(), Ahem Ahem
override fun onCreateSliceProvider(): Boolean { coffeeContext = context return true }
Building Your First Slice ◎ onBindSlice() override fun onBindSlice(sliceUri: Uri):
Slice? { when(sliceUri.path) { "/coffee" -> return createCoffeeSlice(sliceUri) } return null }
Congrats You have built your first Android Slice ! But,
there’s more….. A lot more
Quick Recap
Styling a Slice Templated UI - It all starts with
a List
Place your screenshot here 13
Slice Templates ◎ Range Row/Input Range Row ◎ Header Row
◎ Regular Row ◎ Grid Row
Header Row
Header Row
Regular Row
Regular Row
Grid Row
Grid Row
Range Row
Range Row
Slice Templates
Place your screenshot here 24
Adding Actions To Your Slice
Updating Slices/Dynamic Content
Updating Slices/Dynamic Content
Updating Slices/Dynamic Content
Use-cases/Roadmap
Limitations ◎ UI Templates ◎ Search Results/Ranking ◎ Permission Slice
◎ Actions ◎ Slice Host Ability - For 3rd party Apps
References/Credits & Source ◎ Novoda ◎ Google IO 2018 ◎
Source Code - https://github.com/adnan-SM/slices-starbucks ◎ Slide Theme - SlidesCarnival
Thank You !