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
95
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
32
A developer's guide to wealth
adnan321
0
240
What the Hook ?
adnan321
0
62
Scoping Your Storage
adnan321
2
140
What The Context ?
adnan321
2
190
Putting Work Manager To Work
adnan321
0
86
OOP To FP
adnan321
1
180
Putting Work Manager To Work
adnan321
1
140
Having fun with Kotlin fun()
adnan321
0
83
Other Decks in Programming
See All in Programming
導入から5年が経って見えた Datadog APM 運用の課題
bgpat
2
540
クソコード動画『カプセル化 Mk-II』 で考える 上手くカプセル化できない理由 / encapsulation2
minodriven
11
7.9k
チームでモデリングを育てるうえで 考えたこと・気づいたこと / Cultivating Modeling in Teams: Thoughts and Insights
mackey0225
5
2.3k
MySQL のインデックスの種類をおさらいしよう! / overviewing indexes in MySQL
okashoi
0
170
Ruby製社内ツールのGo移行
bgpat
2
260
PHP8の機能を使って堅牢にコードを書く
fendo181
6
2.6k
Swiftの型推論を学ぼう | Let's Learn About Type Inference in Swift
omochi
2
550
フロントエンドパフォーマンス 入門
shouta2
7
1.5k
CSRF対策のやり方、そろそろアップデートしませんか / Update your knowledge of CSRF protection
hiro_y
25
15k
オブジェクト指向コードレビューの新しいアプローチ
akkie76
3
1.5k
PHPerKaigi 2024〜10年以上動いているレガシーなバッチシステムを Kubernetes(Amazon EKS) に移行する取り組み〜
tshinowpub
1
220
Enhancing Applications with Accessibility API
kishikawakatsumi
3
970
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
36
2k
Fantastic passwords and where to find them - at NoRuKo
philnash
35
2.4k
Into the Great Unknown - MozCon
thekraken
10
830
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
501
140k
Keith and Marios Guide to Fast Websites
keithpitt
407
22k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
124
32k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
11
1.4k
Web Components: a chance to create the future
zenorocha
304
41k
Building Better People: How to give real-time feedback that sticks.
wjessup
350
18k
StorybookのUI Testing Handbookを読んだ
zakiyama
10
4.5k
Git: the NoSQL Database
bkeepers
PRO
421
63k
Unsuck your backbone
ammeep
661
56k
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 !