Skip to content

🦚 Foldable chat Android demonstrates adaptive and responsive UIs with Jetpack WindowManager API.

License

Notifications You must be signed in to change notification settings

GetStream/foldable-chat-android

Repository files navigation

Foldable Chat Android

License API Build Status

A foldable chat Android demonstrates adaptive and responsive UIs with Jetpack WindowManager API.

Overview

This demo project demonstrates dual-screen devices are portable devices with two symmetric screens that work together in unique ways to provide productivity in a flexible form factor. For more details, you can check it out Introduction to dual-screen devices.

Learn More about WindowManager

If you would like to learn more about the WindowManager API, check out the resources below:

Pre-requisites

Install and run the Foldable Emulator

To get started, you need to install the Foldable emulator. This project uses Surface Duo 2 emulator, and you can check it out the links below:

Screen Shot 2021-12-28 at 10 07 14 AM

Jetpack WindowManager

The Jetpack WindowManager library targets foldable devices and enables application developers to support new device form factors and multi-window environments. You can find Jetpack WindowManager information in the Guide: Learn about foldables.

Including on your project

Add the below dependencies to your build.gradle file.

dependencies {
    implementation "androidx.window:window:1.0.0"
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2"
}

WindowManager Example

WindowManager Example module shows how to calculate the screen size and determine device postures with Jetpack WindowManager. You can also refer to the links below for additional help:

Preview

example

WindowManager Chat

WindowManager Chat module demonstrates how to build responsive chat UIs with XML layout with Stream Chat SDK. You can also refer to the links below for additional help:

Preview

example

WindowManager Chat Compose

WindowManager Chat Compose module demonstrates how to build responsive chat UIs with Stream Jetpack Compose SDK. You can also refer to the links below for additional help:

Preview

showcase

Butterfly

If you're looking for useful APIs for Jetpack WindowManager, check out the Butterfly. The Butterfly helps you to build adaptive and responsive UIs for Android with Jetpack WindowManager. Also, it supports useful functions for Jetpack Compose and LiveData integration.

Find this library useful? ❤️

Support it by joining stargazers for this repository. ⭐️
Also, follow Stream on Twitter for our next creations!

License

Copyright 2022 Stream.IO, Inc. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.