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
38
A developer's guide to wealth
adnan321
0
250
What the Hook ?
adnan321
0
73
Scoping Your Storage
adnan321
2
140
What The Context ?
adnan321
2
200
Putting Work Manager To Work
adnan321
0
92
OOP To FP
adnan321
1
190
Putting Work Manager To Work
adnan321
1
150
Having fun with Kotlin fun()
adnan321
0
89
Other Decks in Programming
See All in Programming
法律の脱レガシーに学ぶフロントエンド刷新
oguemon
5
730
Writing documentation can be fun with plugin system
okuramasafumi
0
120
データの整合性を保つ非同期処理アーキテクチャパターン / Async Architecture Patterns
mokuo
41
15k
ISUCON14公式反省会LT: 社内ISUCONの話
astj
PRO
0
180
第3回 Snowflake 中部ユーザ会- dbt × Snowflake ハンズオン
hoto17296
4
360
『品質』という言葉が嫌いな理由
korimu
0
160
2,500万ユーザーを支えるSREチームの6年間のスクラムのカイゼン
honmarkhunt
6
5.1k
Formの複雑さに立ち向かう
bmthd
1
720
[JAWS-UG横浜 #79] re:Invent 2024 の DB アップデートは Multi-Region!
maroon1st
1
140
Unity Android XR入門
sakutama_11
0
140
Ruby on cygwin 2025-02
fd0
0
140
最近のVS Codeで気になるニュース 2025/01
74th
1
250
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
35
1.6k
Facilitating Awesome Meetings
lara
51
6.2k
Practical Orchestrator
shlominoach
186
10k
Building Your Own Lightsaber
phodgson
104
6.2k
Fireside Chat
paigeccino
34
3.2k
Designing Experiences People Love
moore
139
23k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
8
270
How GitHub (no longer) Works
holman
313
140k
Rails Girls Zürich Keynote
gr2m
94
13k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
10
1.3k
Building Adaptive Systems
keathley
40
2.4k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
29
4.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 !