Slide 1

Slide 1 text

Pragmatic Flexible UI Sunitha Burri

Slide 2

Slide 2 text

Metal 3D Models

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

Multiple Content Based Apps in Verizon Media

Slide 5

Slide 5 text

Yahoo News Yahoo Finance Yahoo Sports Aol

Slide 6

Slide 6 text

Apps are Solving the Same Problem over and over again! Networking code to fetch content UI Rendering Persistence Error Handling Testing

Slide 7

Slide 7 text

Time to Share Code!

Slide 8

Slide 8 text

Yahoo News Yahoo Finance

Slide 9

Slide 9 text

Flexible UI

Slide 10

Slide 10 text

Demo Concept through Sample App

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

Custom View

Slide 13

Slide 13 text

createView()

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

Get hold of Views

Slide 16

Slide 16 text

Bind data to Views

Slide 17

Slide 17 text

Consuming Custom View

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

Custom Layout?

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

findViewById() Bind data to View

Slide 22

Slide 22 text

View Ids to Rescue

Slide 23

Slide 23 text

View Id Contract

Slide 24

Slide 24 text

@+id/ vs @id/

Slide 25

Slide 25 text

Use @id instead of @+id

Slide 26

Slide 26 text

Album Image view with @id

Slide 27

Slide 27 text

Summary Implement Custom View ● Default Layout ● Publish View Id Contract ● Add capability to take in a custom layout Consumer of Custom View ● Custom Layout following View Id Contract ● Create Custom View by passing Custom Layout

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

Views are declared as “nullable”

Slide 30

Slide 30 text

Get hold of additional views

Slide 31

Slide 31 text

Summary Implement Custom View ● Default Layout ● Publish View Id Contract ● Add capability to take in a custom layout Consumer of Custom View ● Custom Layout following View Id Contract ● Create Custom View by passing Custom Layout ● Do not include any views that are unnecessary for consumer ● Get hold of any consumer specific views and bind data/handle events

Slide 32

Slide 32 text

RecyclerView

Slide 33

Slide 33 text

onCreateViewHolder()

Slide 34

Slide 34 text

onBindViewHolder()

Slide 35

Slide 35 text

Summary onCreateViewHolder() - keep track of Custom View in View holder - Default layout/Custom layout onBindViewHolder() - delegate binding of data to custom view through View holder

Slide 36

Slide 36 text

Difference between App dev & SDK dev

Slide 37

Slide 37 text

Focus on Performance App cold start time UI rendering issues Track perf metrics Automation testing that covers all possibilities

Slide 38

Slide 38 text

Simple vs Complex APIs published Documentation Convenience!

Slide 39

Slide 39 text

Sharing to What Extent? Looking way forward in to Future Enhancements Supporting Instant apps!

Slide 40

Slide 40 text

Thanks!