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
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
52
A developer's guide to wealth
adnan321
0
260
What the Hook ?
adnan321
0
88
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
200
Putting Work Manager To Work
adnan321
1
160
Having fun with Kotlin fun()
adnan321
0
96
Other Decks in Programming
See All in Programming
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
590
ボトムアップの生成AI活用を推進する社内AIエージェント開発
aku11i
0
380
Amazon ECS Managed Instances が リリースされた!キャッチアップしよう!! / Let's catch up Amazon ECS Managed Instances
cocoeyes02
0
110
Vue 3.6 時代のリアクティビティ最前線 〜Vapor/alien-signals の実践とパフォーマンス最適化〜
hiranuma
2
270
Claude Agent SDK を使ってみよう
hyshu
0
1.4k
Devoxx BE - Local Development in the AI Era
kdubois
0
150
ドメイン駆動設計のエッセンス
masuda220
PRO
15
6.2k
Software Architecture
hschwentner
6
2.4k
Blazing Fast UI Development with Compose Hot Reload (droidcon London 2025)
zsmb
0
400
ALL CODE BASE ARE BELONG TO STUDY
uzulla
28
6.8k
スキーマ駆動で、Zod OpenAPI Honoによる、API開発するために、Hono Takibiというライブラリを作っている
nakita628
0
330
Swift Concurrency 年表クイズ
omochi
2
120
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
27
2.2k
Side Projects
sachag
455
43k
Gamification - CAS2011
davidbonilla
81
5.5k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
Unsuck your backbone
ammeep
671
58k
Product Roadmaps are Hard
iamctodd
PRO
55
11k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.5k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.6k
Speed Design
sergeychernyshev
32
1.2k
Stop Working from a Prison Cell
hatefulcrawdad
272
21k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
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 !