JetPack Window Manager Improves Foldable Support
Written by Kay Ewbank   
Thursday, 03 February 2022

The Jetpack Window Manager library is now available as a stable 1.0 release. The library gives application developers the means to support new device form factors and multi-window environments. It provides a common API surface for API versions 14 and later.

The Jetpack Window Manager library can be used to build apps that are aware of new device features such as folds and hinges. The library was first introduced last year as an addition to Android Jetpack to provide a common API surface for different Window Manager features. Android Jetpack is a suite of libraries for use in Android app development.

jetpacklogo

Jetpack Window Manager contains two main classes aimed at devices that fold, DisplayFeature and FoldingFeature.

DisplayFeature identifies disruptions in the continuous flat screen surface such as hinges or folds. The Window Manager library returns a collection of display features from a layout change callback.

FoldingFeature provides information about a specific feature of the device. In most cases, current devices have only one folding feature, but this might change as devices are released. The FoldingFeature class provides information about the state of that part of the device, with properties for bounds, occlusionType, orientation, state, and isSeparating.

jetpackdual

The updated release also has a new SlidingPaneLayout control that uses Jetpack Window Manager to adapt to dual-screen and foldable devices. The control can show two panes side-by-side so long as there's room on the display. If not, the first pane is shown and the second can be revealed by the user sliding from the side. You can also set it to display programmatically. SlidingPaneLayout adapts to foldable and dual-screen devices by aligning the panes on either side of the hinge or fold.

Single-screen devices, including tablets, will show both panes if the width of the content in each fits side-by-side on screen.

The source code for the SDK is available on GitHub.

 jetpacklogo

More Information

Jetpack Windows Manager 1.0

Related Articles

Android Jetpack Wear OS Libraries Now Stable

Android Jetpack Confusion As V1 Approaches

Google Jetpack Compose UI Toolkit Now In Beta

Android Jetpack Compose Is Welcome, But What About The Churn? 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Udacity Launches All Access Subscription Model
12/09/2023

To help learners advance and expand their skill sets, online learning provider Udacity is switching to a new subscription model that provides unlimited access to its entire catalog.



Unicode 15.1 Released With More Hieroglyphs
22/09/2023

Unicode 15.1 has been released, hot on the heels of Unicode 15. The latest standard adds two new scripts and 4,500 new characters, along with 20 new emojis and extended support for hieroglyphs.


More News

Summer SALE Kindle 9.99 Paperback $10 off!!

esp32book

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Thursday, 03 February 2022 )