# Stories by Yahor Urbanovich on Medium

Stories by Yahor Urbanovich on Medium

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Tiamat -- simple Compose Multiplatform navigation

DevFeed: [Tiamat -- simple Compose Multiplatform navigation](<https://devfeed.tech/articles/tiamat-simple-compose-multiplatform-navigation-26016.md>)

Original publisher: [Read original article](<https://medium.com/mobilepeople/tiamat-simple-compose-multiplatform-navigation-3956dc00a607?source=rss-e93d234beac6------2>)

Author: Yahor Urbanovich

Published: 2024-02-29T12:52:22Z

Content type: tutorial

Language: en

Sources: [Stories by Yahor Urbanovich on Medium](<https://devfeed.tech/sources/stories-by-yahor-urbanovich-on-medium.md>)

Topics: [compose-multiplatform](<https://devfeed.tech/topics/compose-multiplatform.md>), [navigation](<https://devfeed.tech/topics/navigation.md>), [Compose](<https://devfeed.tech/topics/compose.md>), [multiplatform](<https://devfeed.tech/topics/multiplatform.md>), [Library](<https://devfeed.tech/topics/library.md>)

Tags: [compose](<https://devfeed.tech/tags/compose.md>), [compose-multiplatform](<https://devfeed.tech/tags/compose-multiplatform.md>), [demo](<https://devfeed.tech/tags/demo.md>), [developers](<https://devfeed.tech/tags/developers.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>), [navigation](<https://devfeed.tech/tags/navigation.md>), [open-source](<https://devfeed.tech/tags/open-source.md>)

### AI overview

This tutorial introduces Tiamat, an open-source navigation library for Compose Multiplatform. It explains the authors' requirements, including instance-based navigation without string keys, state saving, arbitrary data passing, no code generation, and no dependency on a specific architecture. It also begins demonstrating setup and usage.

### Source excerpt

generated by Bing image creatorTiamat - simple Compose Multiplatform navigationIntro Why do we need another navigation library? You can say: just choose one of the existing solutions. For our project initially, we have chosen the Google Navigation Compose library. It was quite simple for developers who still migrated their minds to the new "Compose world". For some time we made a wrapper around the navigation library, to simplify access to the Navigation controller from any Compose screen. LocalNavController returns the current controller in composition Despite various improvements in navigation, we had a lot of critical moments that did not satisfy us: Navigation using String key A difficult way to pass data between screens Navigation only over replace We have experimented with some other libraries: Voyager -- it doesn't update very often (recently got status 1.0), no possibility to pass lambda as a parameter (issue) Decompose -- a too complex framework for our project. By the way, I use it on personal projects and recommend to try 🌚 other solutions overengeenered (by our opinion) Our requirements To reach a goal, we first need to understand what we are striving for. Here is what we expect from the navigation library: Compose first support + Multiplatform Simple API: Screeen creation, back stack handle, add/replace methods Navigation using Screen instance without any String keys A simple way to save State of the screen Pass Any data types between screens (even lambdas) and deliver the result Without code generation Without tying to any architecture or existing frameworks Welcome Tiamat We were so impressed with our internal library that we decided to make it open-source for Compose community. After several months of experiments and polishing the code we fit all our requirements above. Let's deep dive into code examples. Also, we have created a demo multiplatform App to demonstrate all current features. Please checkout the repository 🌚iOS, Desktop, Android sampleHow t

## Implement Themed Icons (Android 13)

DevFeed: [Implement Themed Icons (Android 13)](<https://devfeed.tech/articles/implement-themed-icons-android-13-26019.md>)

Original publisher: [Read original article](<https://proandroiddev.com/implement-themed-icons-android-13-d20b89233681?source=rss-e93d234beac6------2>)

Author: Yahor Urbanovich

Published: 2022-02-16T10:31:44Z

Content type: tutorial

Language: en

Sources: [Stories by Yahor Urbanovich on Medium](<https://devfeed.tech/sources/stories-by-yahor-urbanovich-on-medium.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [API](<https://devfeed.tech/topics/api.md>), [App](<https://devfeed.tech/topics/app.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-13](<https://devfeed.tech/tags/android-13.md>), [api](<https://devfeed.tech/tags/api.md>), [developer-preview](<https://devfeed.tech/tags/developer-preview.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [icons](<https://devfeed.tech/tags/icons.md>), [implement](<https://devfeed.tech/tags/implement.md>), [material-you](<https://devfeed.tech/tags/material-you.md>), [storytelling](<https://devfeed.tech/tags/storytelling.md>), [themed-icon](<https://devfeed.tech/tags/themed-icon.md>), [themed-icons](<https://devfeed.tech/tags/themed-icons.md>)

### AI overview

A tutorial on implementing themed app icons in Android 13. It explains the limitations of the Android 12 approach and shows how to provide a monochrome icon resource that the system can tint dynamically.

### Source excerpt

Part of the Material You concept is Themed Icons. It means that all icons starting from Android 12 will be the same color and change dynamically based on wallpapers. Android 12 introduced a beta option for enabling Themed Icons, but icons looked inconsistently across the system. Only Google apps had themed icons, other looks the same as previous. Android 12 So far not available no API for developers. I found only a few materials on how to implement themed icons on Android 12. For example: Material You App Icons: Part Way There Briefly, we need to override icon colors in the values-v31 folder to use new Material You colors. It will work, but with several limitations: Changing color in the system doesn't apply to the launch icon. Only after reinstall. Disabling the Themed icons feature doesn't affect the launch icon. Simply, the icon has dynamic color permanently. It's logical, the application can't have two launch icons simultaneously. The Pixel Launcher does the whole magic under the hood and stores an additional set of icons with monochrome icons for all Google apps. Pixel Launcher APK resourcesAndroid 13 way Google recently announced the first Developer Preview of Android 13, while there are a lot of new APIs. One of them is that developers got access to API for Themed app icons. To implement the new approach, we need to take several steps: Clear icon from shadows, unnecessary details and etc. Otherwise, the icon will differ from the uniform style. Icon with shadow 2. Add <monochrome android:drawable=""/> attribute to the <adaptive-icon> element. monochrome tag in icon resourceNote: If android:roundIcon and android:icon are both in your manifest, you must either remove the reference to android:roundIcon or supply the monochrome icon in the drawable defined by the android:roundIcon attribute. That's all, the system automatically applies tint color for the monochrome icon. Demo result: https://medium.com/media/5f60ea9df88d7a59f2d7357f128fcc14/hrefOther cases The rec

## Kotlin property delegates for Datastore Preferences library

DevFeed: [Kotlin property delegates for Datastore Preferences library](<https://devfeed.tech/articles/kotlin-property-delegates-for-datastore-preferences-library-26020.md>)

Original publisher: [Read original article](<https://proandroiddev.com/kotlin-property-delegates-for-datastore-preferences-library-5d4e1cdb609b?source=rss-e93d234beac6------2>)

Author: Yahor Urbanovich

Published: 2021-08-23T15:40:08Z

Content type: tutorial

Language: en

Sources: [Stories by Yahor Urbanovich on Medium](<https://devfeed.tech/sources/stories-by-yahor-urbanovich-on-medium.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Library](<https://devfeed.tech/topics/library.md>), [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [kotlin-flow](<https://devfeed.tech/topics/kotlin-flow.md>), [migration](<https://devfeed.tech/topics/migration.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [androiddev](<https://devfeed.tech/tags/androiddev.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [delegates](<https://devfeed.tech/tags/delegates.md>), [delegation](<https://devfeed.tech/tags/delegation.md>), [deprecated](<https://devfeed.tech/tags/deprecated.md>), [flow](<https://devfeed.tech/tags/flow.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-flow](<https://devfeed.tech/tags/kotlin-flow.md>), [library](<https://devfeed.tech/tags/library.md>), [migration](<https://devfeed.tech/tags/migration.md>), [property-delegation](<https://devfeed.tech/tags/property-delegation.md>), [suspend-function](<https://devfeed.tech/tags/suspend-function.md>)

### AI overview

This tutorial explains migrating preference storage from SharedPreferences to AndroidX DataStore Preferences. It shows how Kotlin property delegation can encapsulate reading and writing values, and how Flow, coroutines, first(), and runBlocking can support single-value access despite DataStore's Flow-based API.

### Source excerpt

Kotlin delegated property for Datastore Preferences library Recently AndroidX Datastore 1.0 was released. The moment has come, it's time to migrate away from SharedPreferences. As for me, the key benefit is the built-in support of Kotlin Flow and Coroutines. Previously we had to write our own wrapper under SharedPreferences.OnSharedPreferenceChangeListener, emit changes into ConflatedBroadcastChannel and then convert it into Flow. https://medium.com/media/b5410ce9df08d9b73427a2138a6b0a8d/href Firstly, this approach produces a lot of intermediate variables. Secondly, ConflatedBroadcastChannel deprecated and should be replaced with StateFlow. In this case, DataStore comes out as the winner. The migrated to DataStore version looks clean and simple. https://medium.com/media/cce0d485e2af9941e677dc7973a54c6f/hrefRead/write single value using SharedPreferences Let's imagine, we need to store the current App theme as String. For this purpose, we need to initialize SharedPreferences, then make two functions to read and write these values. https://medium.com/media/3bc9760a22ebd1071e4dcb21eaf8d4ba/href Well, two functions it is not so bad, but we can try to merge this into single Property. https://medium.com/media/c3babbf2b6c55bb18172f66ddc825b06/href To make it fully clear and supportable we can use the Kotlin delegation feature. As we want to read and write simultaneously, ReadWriteProperty will suit our goal. https://medium.com/media/80f370a5a5735b911c75d3a0f1d22b21/href Please take a look at the final compact version, where all logic is encapsulated inside the delegate. https://medium.com/media/39b5311b04373b1f31d3030b8b083587/hrefDataStore Preferences and missing API During migration, it turned out that the library doesn't provide an API for reading a single property. DataStore proposes to use Flow for all cases. Developers are now required to read/write the value in the scope of a suspend function. https://medium.com/media/e7c4e45e239e11bc5082f3997e5280dd/href What was e

## How to animate BottomSheet content using Jetpack Compose

DevFeed: [How to animate BottomSheet content using Jetpack Compose](<https://devfeed.tech/articles/how-to-animate-bottomsheet-content-using-jetpack-compose-26018.md>)

Original publisher: [Read original article](<https://proandroiddev.com/how-to-animate-bottomsheet-content-using-jetpack-compose-3eab972b3bdc?source=rss-e93d234beac6------2>)

Author: Yahor Urbanovich

Published: 2021-08-09T13:10:56Z

Content type: tutorial

Language: en

Sources: [Stories by Yahor Urbanovich on Medium](<https://devfeed.tech/sources/stories-by-yahor-urbanovich-on-medium.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Android](<https://devfeed.tech/topics/android.md>), [ui](<https://devfeed.tech/topics/ui.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [animation](<https://devfeed.tech/tags/animation.md>), [bottomsheet](<https://devfeed.tech/tags/bottomsheet.md>), [code](<https://devfeed.tech/tags/code.md>), [experience](<https://devfeed.tech/tags/experience.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [ui](<https://devfeed.tech/tags/ui.md>)

### AI overview

A tutorial on animating BottomSheet content with Jetpack Compose. It compares existing Compose examples, explains their state and visibility handling, and introduces a simpler approach using Compose BottomSheet APIs.

### Source excerpt

Note: Everything in this post related to Compose 1.0.1 and maybe in the future Google will introduce a new API and approaches like Compose MotionLayout 🐰 Early this year I started a new pet project for listening to random radio from over the world. The UI at the beginning was very simple and clear, just a logo with the station name and necessary controls. The main functionality is integration with Android Auto, but it is a topic for a separate story (just ask in the comments if you are interested in this theme). First app iteration Using the application, it became necessary to see user liked stations, other categories separated by genre and country. The idea is to make a Home screen with a list of different information and player which can be shown and hidden on the screen. Final resultFind available solutions As a normal developer, I started to research existing compose projects to find already implemented functionality. The official and community samples contain only the UI part and don't include any interaction. For example, the Spotify UI demo application for me implies a presence player screen, but in source code, it's just a Row with content. https://github.com/Gurupreet/ComposeCookBook Another interesting repository I found is a Podcast App. According to the gif looks like what I was looking for. https://github.com/fabirt/podcast-app After inspecting the source code I understood how it works. The PodcastPlayerScreen is a Root composable for the player and it added to the composition of the main screen. By default, it's not visible for users. https://github.com/fabirt/podcast-app/blob/6b4876fd007c54e3f10160c091d3c29147b20211/android/app/src/main/java/com/fabirt/podcastapp/ui/MainActivity.kt#L57 Then if the user clicks on some podcast item it changes the showPlayerFullScreen boolean. Recomposition triggers the AnimatedVisibility logic and the player appears. https://github.com/fabirt/podcast-app/blob/6b4876fd007c54e3f10160c091d3c29147b20211/android/app/src/main

## How I made beautiful screenshots for Google Play (Developer experience)

DevFeed: [How I made beautiful screenshots for Google Play (Developer experience)](<https://devfeed.tech/articles/how-i-made-beautiful-screenshots-for-google-play-developer-experience-26017.md>)

Original publisher: [Read original article](<https://proandroiddev.com/how-i-made-beautiful-screenshots-for-google-play-developer-experience-61ce108fa6b4?source=rss-e93d234beac6------2>)

Author: Yahor Urbanovich

Published: 2021-07-10T11:24:12Z

Content type: tutorial

Language: en

Sources: [Stories by Yahor Urbanovich on Medium](<https://devfeed.tech/sources/stories-by-yahor-urbanovich-on-medium.md>)

Topics: [Google Play](<https://devfeed.tech/topics/google-play.md>), [Android](<https://devfeed.tech/topics/android.md>), [App](<https://devfeed.tech/topics/app.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>), [pixel](<https://devfeed.tech/topics/pixel.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-studio](<https://devfeed.tech/tags/android-studio.md>), [developer](<https://devfeed.tech/tags/developer.md>), [google-play](<https://devfeed.tech/tags/google-play.md>), [google-play-developer](<https://devfeed.tech/tags/google-play-developer.md>), [personal-experience](<https://devfeed.tech/tags/personal-experience.md>), [photoshop](<https://devfeed.tech/tags/photoshop.md>), [play-store](<https://devfeed.tech/tags/play-store.md>), [screenshots](<https://devfeed.tech/tags/screenshots.md>)

### AI overview

A developer shares a workflow for creating polished Google Play screenshots, comparing device-mockup tools and online services with a do-it-yourself approach using Google Play guidelines, Photoshop, mobile tools, and Android Studio.

### Source excerpt

Comparison of the initial and final result Every developer who has an application in Play Store worries about user engagement before the application install. This metric can be simply improved by adding beautiful and informative screenshots. I want to share my own experience of how I made it for my pet project. Let's begin. Originally I prepared screenshots for Google Play using a simple approach: Make a screenshot of the application Add it into Device Mockup to make it more natural Publish to Google Play For this purpose, I used Screener: https://play.google.com/store/apps/details?id=de.toastcode.screener&hl=en_US The tool is useful, contains a different amount of phone frames and manufacturers, and fully customizable. Screenshot after rendering The main lack for me that the application didn't update since 2018 and doesn't contain new Android devices, especially Google Pixel's latest model. Screener app info from Google PlayFind the other solutions. If you are lazy and don't want to spend your free time, the best way to organize screenshots is through online services. Few of them, which I have tried: https://mockups.pixeltrue.com/ 2. https://previewed.app/ 3. https://theapplaunchpad.com/ 4. https://screen.traction.one/ 5. https://www.launchmatic.app/ The main drawbacks of online services for me: To unlock more themes and functionalities you need to have paid subscription Limited customization Can't adjust the screenshot for mockup, the content cropped unexpectedly from different sides Some services focus only on iPhone or several Android devices How to deal with a problem? Do It Yourself! What we need: Official guidelines Adobe Photoshop and basic editing skills Creativity and inspiration Official Google Play guidelines: https://support.google.com/googleplay/android-developer/answer/9866151?hl=en The most important for us from the Screenshots section: Edit excess elements in the notification bar before submitting. Do not show service providers or notifications. The