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
バッチ処理を「状態の記録」から「事実の記録」へ
panda728
PRO
0
170
Leading Effective Engineering Teams in the AI Era
addyosmani
7
510
テーブル定義書の構造化抽出して、生成AIでDWH分析を試してみた / devio2025tokyo
kasacchiful
0
210
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
320
monorepo の Go テストをはやくした〜い!~最小の依存解決への道のり~ / faster-testing-of-monorepos
convto
2
510
CSC305 Lecture 08
javiergs
PRO
0
250
Introduce Hono CLI
yusukebe
6
2.9k
Webサーバーサイド言語としてのRustについて
kouyuume
0
470
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
480
大規模アプリのDIフレームワーク刷新戦略 ~過去最大規模の並行開発を止めずにアプリ全体に導入するまで~
mot_techtalk
1
470
はじめてのDSPy - 言語モデルを『プロンプト』ではなく『プログラミング』するための仕組み
masahiro_nishimi
3
710
Range on Rails ―「多重範囲型」という新たな選択肢が、複雑ロジックを劇的にシンプルにしたワケ
rizap_tech
0
6.7k
Featured
See All Featured
Designing for humans not robots
tammielis
254
26k
Unsuck your backbone
ammeep
671
58k
A better future with KSS
kneath
239
18k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
34
2.3k
Build your cross-platform service in a week with App Engine
jlugia
232
18k
Navigating Team Friction
lara
190
15k
The Cost Of JavaScript in 2023
addyosmani
55
9k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Music & Morning Musume
bryan
46
6.8k
Practical Orchestrator
shlominoach
190
11k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
190
55k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
115
20k
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 !