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
A slice of Android Slices - droidcon London 2018
Search
Adnan A M
October 26, 2018
Programming
0
100
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
44
A developer's guide to wealth
adnan321
0
250
What the Hook ?
adnan321
0
79
Scoping Your Storage
adnan321
2
150
What The Context ?
adnan321
2
210
Putting Work Manager To Work
adnan321
0
95
OOP To FP
adnan321
1
200
Putting Work Manager To Work
adnan321
1
150
Having fun with Kotlin fun()
adnan321
0
90
Other Decks in Programming
See All in Programming
Browser and UI #2 HTML/ARIA
ken7253
2
180
オープンソースコントリビュート入門
_katsuma
0
140
AIコーディングの本質は“コード“ではなく“構造“だった / The essence of AI coding is not “code” but "structure
seike460
PRO
2
500
JAWS DAYS 2025 re_Cheers: WEB
komakichi
0
120
The Missing Link in Angular’s Signal Story: Resource API and httpResource
manfredsteyer
PRO
0
150
Ruby で作る RISC-V CPU エミュレーター / RISC-V CPU emulator made with Ruby
hayaokimura
5
1.2k
VitestのIn-Source Testingが便利
taro28
9
2.5k
データベースの技術選定を突き詰める ~複数事例から考える最適なデータベースの選び方~
nnaka2992
3
2.2k
AIコーディングエージェントを 「使いこなす」ための実践知と現在地 in ログラス / How to Use AI Coding Agent in Loglass
rkaga
4
1.4k
UMAPをざっくりと理解 / Overview of UMAP
kaityo256
PRO
3
1.6k
REALITY コマンド作成チュートリアル
nishiuriraku
0
120
インプロセスQAにおいて大事にしていること / In-process QA Meetup
medley
0
170
Featured
See All Featured
The MySQL Ecosystem @ GitHub 2015
samlambert
251
12k
Why Our Code Smells
bkeepers
PRO
336
57k
Practical Orchestrator
shlominoach
187
11k
Fireside Chat
paigeccino
37
3.4k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.5k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
800
Docker and Python
trallard
44
3.4k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.2k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
How STYLIGHT went responsive
nonsquared
100
5.5k
Faster Mobile Websites
deanohume
307
31k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
52
2.6k
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 !