Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/leoando/android11-toast-samples

Sample for Toast (target Android 11)
https://github.com/leoando/android11-toast-samples

android android-compose android-java android-kotlin jetpack-compose toast

Last synced: about 1 month ago
JSON representation

Sample for Toast (target Android 11)

Awesome Lists containing this project

README

        

# Project Overview

This is a project for investigating the Toast API.

[日本語版_README](https://github.com/LeoAndo/android-toast-samples/blob/main/readme/README_JP.md)

# development enveroment
127751156-0638bd97-e532-43e9-be12-e758a7118141

# Conclusion (alternative)
Toast uses a Only [makeText](https://developer.android.com/reference/kotlin/android/widget/Toast?hl=ja#maketext).

or Use [Snackbar](https://developer.android.com/reference/com/google/android/material/snackbar/Snackbar), which can be displayed only when the app is in the foreground.

# refs

## [Toast-specification-changes-OS:11](https://developer.android.com/about/versions/11/behavior-changes-11?hl=ja#toasts)

## Toast-specification-changes-OS:12
- can put up to 2 lines of text message in Toast.

- https://youtu.be/D2cU_itNDAI?t=714

- Limited the number of Toasts that can be displayed.
- https://youtu.be/D2cU_itNDAI?t=727

# Capture (Android View)

| Pixel 4 OS10 | Pixel 4 OS11 |
|:---|:---:|
| | |

# Capture (Compose)

| Pixel 4 OS: 8 | Pixel 4 OS: 12 |
|:---|:---:|
| | |

# For Compose
https://github.com/LeoAndo/android-toast-samples/tree/main/ToastComposeSample

# For Kotlin code
https://github.com/LeoAndo/android-toast-samples/tree/main/ToastKotlinSample

# For Java code
https://github.com/LeoAndo/android-toast-samples/tree/main/ToastJavaSample