Slide 1

Slide 1 text

Foldables Thomas Künneth

Slide 2

Slide 2 text

• Very compact • Must be opened for full usage • Screen is Smartphone-sized • Book-like experience • Typically, 360-degree hinge • Various postures depending on intended use • Feels like a smartphone when closed • Becomes a tablet when opened

Slide 3

Slide 3 text

• Foldables have one, two, or possibly more 😎 display areas • Biggest area • divided into two parts separated by a hinge • comprises of ONE or TWO physical screens • Not all foldables provide a large display area

Slide 4

Slide 4 text

• A blocking hinge may cause no problems at all • May make the UX a little less pleasing • May require changes to the user interface

Slide 5

Slide 5 text

• Ignore devices with obstructing hinges • Make our apps first class citizens on as many devices as possible • Either way we need to deal with the large screens

Slide 6

Slide 6 text

https://developer.android.com/about/versions/android-3.0-highlights#ui • Alternartive resources available since the beginning • Fragments: Android 3 • We even had ActivityGroup Android ❤️ different form factors

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

Layout was changed when … • a Freeform window was resized • a foldable device was folded / unfolded

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

Layout changes • Resizing a Freeform window • Open / close a foldable • Rotating the device (portrait / landscape) • Entering / leaving split-screen mode • Entering / leaving picture in picture mode

Slide 13

Slide 13 text

• Apps don’t always use the whole screen (app window may much be smaller) • App layout is based on the app window size Clem Onojeghuo https://unsplash.com/photos/P7-_EB3gQuA

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

Daniel McCullough https://unsplash.com/photos/-FPFq_trr2Y Material Design encourages app layout based on Window Size Classes

Slide 16

Slide 16 text

Compact 480 dp 900 dp 600 dp 840 dp Expanded Medium Compact Medium Expanded

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

Window Size Classes affect which components we use and the location and size of the content area What’s inside the content area 🤔 Clem Onojeghuo https://unsplash.com/photos/P7-_EB3gQuA

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

• Foldables divide the content area into two panes • The hinge may create a visible gap What’s inside the content area and how do we lay it out 🤔 Clem Onojeghuo https://unsplash.com/photos/P7-_EB3gQuA

Slide 21

Slide 21 text

https://developer.android.com/about/versions/android-3.0-highlights#ui

Slide 22

Slide 22 text

• Content elements in a grid • Easily browse a large amount of content Canonical layout - Feed Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum

Slide 23

Slide 23 text

• Explorable lists of items • Item detail (supplementary information alongside each item) • Two side-by-side panes Canonical layout - List-detail Lorem Ipsum Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua.

Slide 24

Slide 24 text

• Organize app content into primary and secondary display areas • Secondary content supports the main content Canonical layout - Supporting pane Lorem Ipsum Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua.

Slide 25

Slide 25 text

• Based on logical panes • React to app window size changes • Location, size, and component for navigation • Number and content of panes Clem Onojeghuo https://unsplash.com/photos/P7-_EB3gQuA

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

• flutter_adaptive_scaffold (https://pub.dev/packages/flutter_adaptive_scaffold) • Easy-to-uase AdaptiveScaffold • Flexible AdaptiveLayout with SlotLayout, SlotLayoutConfig, … Implementation - Flutter

Slide 28

Slide 28 text

• So far no ready-to-use components • View-based apps and apps relying on Fragments can use established patterns • Compose apps can use Accompanist (contains TwoPane()) • Jetpack WindowManager (https://developer.android.com/jetpack/androidx/releases/window) • Google Examples (https://github.com/android/user-interface-samples/tree/main/CanonicalLayouts) Implementation – Android Native

Slide 29

Slide 29 text

• FoldableDemo (https://github.com/tkuenneth/android-demos/tree/master/compose/FoldableDemo) • FlutterFoldableDemo (https://github.com/tkuenneth/flutterfoldabledemo) My examples

Slide 30

Slide 30 text

@tkuenneth @tkuenneth @tkuenneth @[email protected] https://www.thomaskuenneth.eu/ Thank you