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
A slice of Android Slices - droidcon London 2018
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Adnan A M
October 26, 2018
Programming
140
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
A slice of Android Slices - droidcon London 2018
Slides for my talk at droidcon London 2018.
Adnan A M
October 26, 2018
Transcript
32 slides
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 !
More Decks by Adnan A M
See All by Adnan A M
Abridge Coding Guidelines
adnan321
0
110
A developer's guide to wealth
adnan321
0
300
What the Hook ?
adnan321
0
120
Scoping Your Storage
adnan321
2
210
What The Context ?
adnan321
2
250
Putting Work Manager To Work
adnan321
0
150
OOP To FP
adnan321
1
230
Putting Work Manager To Work
adnan321
1
240
Having fun with Kotlin fun()
adnan321
0
130
Other Decks in Programming
See All in Programming
動画プレイヤーはなぜカクつくのか 〜Flutterのレンダリングとネイティブの境界を解剖する〜
naruogram
0
350
眠らない開発チームの作り方
biwakonbu
0
180
あなたはMCPの機能を、まだ知らない。
4geru
1
750
protojson における文字化けの扱い
kazuki1023
0
470
初学者向け 分散トレーシングとDatadog
mtaka1222
0
110
なぜ私たちは「現時点では」KMPの導入を見送ったのか
chigichan24
1
650
自宅サーバはどこまで再現できるのか - Proxmox VE上のVM環境をIaCとバックアップで戻してみた
youto
0
450
マルチプロダクトSaaSの アプリ一覧を速くする——複数プロダクトにまたがる「権限行脚」を減らすまで #techramen26conf
mktakuya
1
260
AI駆動TDD ― 2026年10月版
hrmstrsmgs
0
120
Agentic AI with the Power of Jakarta EE
ivargrimstad
0
240
DroidKnights 2026 Android A2UI Jetpack Compose 기반의 안전한 AI UI 렌더링 - 박제창
itsmedreamwalker
1
270
テスト駆動開発から学ぶ 達人プログラマーの型 / TechRAMEN 2026 Conference
a_okui
0
3.2k
Featured
See All Featured
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
370
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
340
Accessibility Awareness
sabderemane
1
320
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
580
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
490
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.7k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1.1k
Code Review Best Practice
trishagee
74
20k
Music & Morning Musume
bryan
48
7.5k