project-light.in
  • Home
  • Privacy Policy
  • Contact Us
  • Guest Post – Write For Us
  • Sitemap
project-light.in

A sample chat app built with Jetpack Compose

  • Jeffery Williams
  • November 4, 2021
Total
0
Shares
0
0
0

Jetpack Compose is a sample chat app built on the Node.js platform with support for WebSockets, which allows users to send messages and share media in real-time across connected devices. Jetpack Compose was designed as an example of how quickly development can happen when using this framework.

The “jetpack compose source code” is a sample chat app built with Jetpack Compose. It’s a simple chat application that uses the material design and has plenty of features for users to enjoy.

Jetchat is a Jetpack Compose-based chat application.

You’ll need Android Studio Arctic Fox to test out this example app. Following the methods below, you may clone this repository or import the project using Android Studio.

This example demonstrates:

  • State management in the user interface
  • Navigation, Fragments, and ViewModel integration with Components of Architecture
  • Using the back button
  • Input of text and control of focus
  • Transitions and animations of many sorts
  • Across configuration modifications, the state is saved.
  • Material You dynamic color and Material Design 3 theming
  • UI tests

A-sample-chat-app-built-with-Jetpack-Compose

Currently, the project is in process.

Jetchat is currently in beta, and certain features have yet to be deployed.

Features

Management of the user interface state

This screen’s entry point is the ConversationContent composable, which accepts a ConversationUiState that describes the data to be presented. This does not imply that all state is provided by a single point: composables might have their own state as well. See scrollState in ConversationContent or currentInputSelector in UserInput for examples.

Architecture Components

The ProfileFragment demonstrates how to use the Navigation component to move data across fragments and use LiveData to monitor status from a ViewModel.

Using the back button

When the Emoji picker appears, tapping the back button in the app dismisses it, interfering with any navigation actions. This feature demonstrates how to use Ambients to connect Compose and Android Framework APIs like OnBackPressedDispatcherOwner. ConversationUiState contains the implementation.

Input of text and control of focus

The keyboard must be hidden while the Emoji panel is visible, and vice versa. The FocusRequester and onFocusChanged APIs are used to do this.

Transitions and animations of many sorts

The animations used in this example range from basic AnimatedVisibility in FunctionalityNotAvailablePanel to coordinated transitions seen in the Profile screen’s FloatingActionButton and implemented in AnimatingFabContent.

UI that spans the whole screen with synchronized IME transitions

For a more immersive aesthetic, this sample is set out edge-to-edge, pulling its content behind the system bars.

When running on API 30+ devices, the sample now supports synchronized IME transitions. Look at how Modifier is used. ConversationContent has a navigationBarsWithImePadding() method.

1635930774_905_A-sample-chat-app-built-with-Jetpack-Compose

WindowInsets support is provided by the Accompanist Insets library in this example.

Across configuration modifications, the state is saved.

Some composable states, such as currentInputSelector in UserInput, survive activity or process reconstruction.

Material You dynamic color and Material Design 3 theming

Jetchat employs the MaterialTheme composable and M3 components and adheres to the Material Design 3 principles. Jetchat now supports Material You dynamic color on Android 12 and higher, which pulls a bespoke color scheme from the device wallpaper. As a backup, Jetchat utilizes a bespoke, branded color scheme. It also uses the Karla and Montserrat font families to create unique typography.

UI tests

You’ll find a set of UI tests in androidTest that highlight noteworthy patterns in Compose:

ConversationTest

Tests for the Conversation screen’s user interface. Includes a test that examines the app’s behavior when dark mode is switched on.

NavigationTest

Demonstrates how to construct tests that assert on the Navigation Controller directly.

UserInputTest

Checks that the user input is composable, including extended controls, and that the keyboard is shown and hidden as intended.

Issues that have been identified

  1. If the emoji selection is visible, clicking on the TextField may reveal both input methods. This problem is being tracked at https://issuetracker.google.com/164859446.

  2. There are only two profiles, and clicking on anybody other than “me” will bring up the identical information.

License

2020 Copyright The Apache License, Version 2.0 (the “License”) applies to the Android Open Source Project; you may not use this file unless you comply with the License. The License is available at https://www.apache.org/licenses/LICENSE-2.0. Unless otherwise required by relevant law or agreed upon in writing, software distributed under the License is provided “AS IS,” with no explicit or implied warranties or conditions. The full text defining rights and limits under the License may be found in the License.

GitHub

Visit Github for further information.

The “jetpack compose example” is a sample chat app built with Jetpack Compose. It uses the latest features of the library to create a modern, functional UI.

Related Tags

  • jetpack compose login form
  • jetpack compose recyclerview
  • jetpack compose cheat sheet
  • jetpack compose chat
  • jetpack compose navigation sample
Total
0
Shares
Share 0
Tweet 0
Pin it 0
Jeffery Williams

Previous Article

Download Haraqa Loans for PC Windows 10,8,7

  • Jeffery Williams
  • November 4, 2021
View Post
Next Article

Vikings: Valhalla Saga For PC (Windows 10, 8, 7)

  • Jeffery Williams
  • November 4, 2021
View Post
Table of Contents
    1. Currently, the project is in process.
  1. Features
    1. Management of the user interface state
    2. Architecture Components
    3. Using the back button
    4. Input of text and control of focus
    5. Transitions and animations of many sorts
    6. UI that spans the whole screen with synchronized IME transitions
    7. Across configuration modifications, the state is saved.
    8. Material You dynamic color and Material Design 3 theming
    9. UI tests
  2. Issues that have been identified
  3. License
  4. GitHub
Featured
  • 1
    How to Update DOOGEE X5 Max to Android 7.0 Nougat Stock ROM
    • April 30, 2022
  • 2
    6 Best Cheapest 4k Projectors 2022
    • April 28, 2022
  • 3
    All You Need To Know [Guide 2022]
    • April 25, 2022
  • 4
    How to Configure a Static IP Address on Alpine Linux
    • April 25, 2022
  • 5
    Sync.com vs Microsoft OneDrive (2022)
    • April 24, 2022
Must Read
  • 1
    Fix Windows Hello not working on Windows 11
  • 2
    Autodesk Fusion 360 2.0.11680 Crack + License Key Full + Keygen TXT File Download
  • 3
    Download #SIDELOADTAG for PC Windows 10,8,7
project-light.in
  • Home
  • Privacy Policy
  • Contact Us
  • Guest Post – Write For Us
  • Sitemap
Stay Updated Always.

Input your search keywords and press Enter.