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
97
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
35
A developer's guide to wealth
adnan321
0
240
What the Hook ?
adnan321
0
72
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
140
Having fun with Kotlin fun()
adnan321
0
87
Other Decks in Programming
See All in Programming
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
0
190
受け取る人から提供する人になるということ
little_rubyist
0
180
Importmapを使ったJavaScriptの 読み込みとブラウザアドオンの影響
swamp09
4
1.3k
cXML という電子商取引の トランザクションを支える プロトコルと向きあっている話
phigasui
3
2.3k
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
340
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
500
WEBエンジニア向けAI活用入門
sutetotanuki
0
330
タクシーアプリ『GO』のリアルタイムデータ分析基盤における機械学習サービスの活用
mot_techtalk
4
160
【Kaigi on Rails 2024】YOUTRUST スポンサーLT
krpk1900
1
300
讓數據說話:用 Python、Prometheus 和 Grafana 講故事
eddie
0
380
Modern Angular: Renovation for Your Applications
manfredsteyer
PRO
0
240
生成 AI を活用した toitta 切片分類機能の裏側 / Inside toitta's AI-Based Factoid Clustering
pokutuna
0
720
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
43
13k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Navigating Team Friction
lara
183
14k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
231
17k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
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 !