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
39
A developer's guide to wealth
adnan321
0
250
What the Hook ?
adnan321
0
76
Scoping Your Storage
adnan321
2
140
What The Context ?
adnan321
2
200
Putting Work Manager To Work
adnan321
0
94
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
Jakarta EE meets AI
ivargrimstad
0
510
CDKを使ったPagerDuty連携インフラのテンプレート化
shibuya_shogo
0
110
AIプログラミング雑キャッチアップ
yuheinakasaka
19
4.8k
推しメソッドsource_locationのしくみを探る - はじめてRubyのコードを読んでみた
nobu09
2
330
Amazon Bedrockマルチエージェントコラボレーションを諦めてLangGraphに入門してみた
akihisaikeda
1
130
iOSでQRコード生成奮闘記
ktcryomm
2
110
Datadog DBMでなにができる? JDDUG Meetup#7
nealle
0
150
メンテが命: PHPフレームワークのコンテナ化とアップグレード戦略
shunta27
0
310
仕様変更に耐えるための"今の"DRY原則を考える
mkmk884
9
3.2k
15分で学ぶDuckDBの可愛い使い方 DuckDBの最近の更新
notrogue
3
710
5分で理解する SOLID 原則 #phpcon_nagoya
shogogg
1
380
新宿駅構内を三人称視点で探索してみる
satoshi7190
2
120
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
40
2.5k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
12
1k
A Tale of Four Properties
chriscoyier
158
23k
Speed Design
sergeychernyshev
27
810
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
The Invisible Side of Design
smashingmag
299
50k
Bash Introduction
62gerente
611
210k
BBQ
matthewcrist
87
9.5k
Making Projects Easy
brettharned
116
6k
Code Reviewing Like a Champion
maltzj
521
39k
Being A Developer After 40
akosma
89
590k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.2k
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 !