Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
A Slice of Android Slices Adnan A M
Slide 2
Slide 2 text
What are Android Slices ? ◎ Small Interactable UI elements ◎ Fancy Content Providers ◎ Remote Content Views -Widgets
Slide 3
Slide 3 text
Why should you have a Slice ? ◎ Interactable ◎ Dynamic/Updatable ◎ Supports API 19(Kitkat) - Yaaay
Slide 4
Slide 4 text
The Life Of A Slice
Slide 5
Slide 5 text
Building Your First Slice ◎ Add Dependencies dependencies { // ... implementation "androidx.slice:slice-builders-ktx:(ver)" // ... }
Slide 6
Slide 6 text
Building Your First Slice ◎ Extend Slice Provider class class CoffeeSliceProvider: SliceProvider() { .. .. }
Slide 7
Slide 7 text
Building Your First Slice ◎ Register the Fancy Content Provider
Slide 8
Slide 8 text
Building Your First Slice ◎ onCreateSliceProvider() - Cp.onCreate(), Ahem Ahem override fun onCreateSliceProvider(): Boolean { coffeeContext = context return true }
Slide 9
Slide 9 text
Building Your First Slice ◎ onBindSlice() override fun onBindSlice(sliceUri: Uri): Slice? { when(sliceUri.path) { "/coffee" -> return createCoffeeSlice(sliceUri) } return null }
Slide 10
Slide 10 text
Congrats You have built your first Android Slice ! But, there’s more….. A lot more
Slide 11
Slide 11 text
Quick Recap
Slide 12
Slide 12 text
Styling a Slice Templated UI - It all starts with a List
Slide 13
Slide 13 text
Place your screenshot here 13
Slide 14
Slide 14 text
Slice Templates ◎ Range Row/Input Range Row ◎ Header Row ◎ Regular Row ◎ Grid Row
Slide 15
Slide 15 text
Header Row
Slide 16
Slide 16 text
Header Row
Slide 17
Slide 17 text
Regular Row
Slide 18
Slide 18 text
Regular Row
Slide 19
Slide 19 text
Grid Row
Slide 20
Slide 20 text
Grid Row
Slide 21
Slide 21 text
Range Row
Slide 22
Slide 22 text
Range Row
Slide 23
Slide 23 text
Slice Templates
Slide 24
Slide 24 text
Place your screenshot here 24
Slide 25
Slide 25 text
Adding Actions To Your Slice
Slide 26
Slide 26 text
Updating Slices/Dynamic Content
Slide 27
Slide 27 text
Updating Slices/Dynamic Content
Slide 28
Slide 28 text
Updating Slices/Dynamic Content
Slide 29
Slide 29 text
Use-cases/Roadmap
Slide 30
Slide 30 text
Limitations ◎ UI Templates ◎ Search Results/Ranking ◎ Permission Slice ◎ Actions ◎ Slice Host Ability - For 3rd party Apps
Slide 31
Slide 31 text
References/Credits & Source ◎ Novoda ◎ Google IO 2018 ◎ Source Code - https://github.com/adnan-SM/slices-starbucks ◎ Slide Theme - SlidesCarnival
Slide 32
Slide 32 text
Thank You !