# Yahor Urbanovich

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: [Yahor Urbanovich](<https://devfeed.tech/sources/stories-by-yahor-urbanovich-on-medium.md>)

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

Tags: [api](<https://devfeed.tech/tags/api.md>), [app](<https://devfeed.tech/tags/app.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compose-multiplatform](<https://devfeed.tech/tags/compose-multiplatform.md>), [controller](<https://devfeed.tech/tags/controller.md>), [critical](<https://devfeed.tech/tags/critical.md>), [data](<https://devfeed.tech/tags/data.md>), [data-types](<https://devfeed.tech/tags/data-types.md>), [deep](<https://devfeed.tech/tags/deep.md>), [deep-dive](<https://devfeed.tech/tags/deep-dive.md>), [demo](<https://devfeed.tech/tags/demo.md>), [developers](<https://devfeed.tech/tags/developers.md>), [examples](<https://devfeed.tech/tags/examples.md>), [experiments](<https://devfeed.tech/tags/experiments.md>), [features](<https://devfeed.tech/tags/features.md>), [first](<https://devfeed.tech/tags/first.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>), [navigation](<https://devfeed.tech/tags/navigation.md>), [simple](<https://devfeed.tech/tags/simple.md>)

### AI overview

Tiamat is presented as a Compose Multiplatform navigation library built around screen instances rather than string keys. Its examples show defining destinations with `navDestination`, creating a controller, and navigating with `navigate`, `replace`, or `back`; typed `navArgs` pass data to screens, while `back` can return a result. The article also demonstrates nested controllers, editable back stacks, and a library-provided `TiamatViewModel` with configuration-change state saving and `viewModelScope`. It positions Tiamat as a simpler fit for the authors' project than their earlier Google Navigation Compose wrapper, and says Voyager lacked lambda parameters while Decompose felt too complex for that project. A multiplatform demo is mentioned; advanced cases such as bottom-bar navigation and custom transitions are pointed to in the sample app rather than explained here.

### 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: [Yahor Urbanovich](<https://devfeed.tech/sources/stories-by-yahor-urbanovich-on-medium.md>)

Topics: [material-you](<https://devfeed.tech/topics/material-you.md>), [Android](<https://devfeed.tech/topics/android.md>), [Icons](<https://devfeed.tech/topics/icons.md>)

Tags: [adaptive-icon](<https://devfeed.tech/tags/adaptive-icon.md>), [android](<https://devfeed.tech/tags/android.md>), [android-13](<https://devfeed.tech/tags/android-13.md>), [api](<https://devfeed.tech/tags/api.md>), [apis](<https://devfeed.tech/tags/apis.md>), [developer](<https://devfeed.tech/tags/developer.md>), [developer-preview](<https://devfeed.tech/tags/developer-preview.md>), [developers](<https://devfeed.tech/tags/developers.md>), [google](<https://devfeed.tech/tags/google.md>), [icons](<https://devfeed.tech/tags/icons.md>), [implement](<https://devfeed.tech/tags/implement.md>), [launch](<https://devfeed.tech/tags/launch.md>), [launcher](<https://devfeed.tech/tags/launcher.md>), [material](<https://devfeed.tech/tags/material.md>), [material-you](<https://devfeed.tech/tags/material-you.md>), [storytelling](<https://devfeed.tech/tags/storytelling.md>), [style](<https://devfeed.tech/tags/style.md>), [system](<https://devfeed.tech/tags/system.md>), [themed-icon](<https://devfeed.tech/tags/themed-icon.md>), [themed-icons](<https://devfeed.tech/tags/themed-icons.md>)

### AI overview

Android 13 adds an API for themed app icons: simplify the icon to remove shadows and unnecessary detail, then add a <monochrome android:drawable="..."/> resource to the <adaptive-icon>; the system applies the tint. If the manifest sets both android:icon and android:roundIcon, the excerpt says to remove the roundIcon reference or provide a monochrome resource for its drawable. Layered icons may need per-path android:fillAlpha adjustments to retain depth; complex designs may require a separately drawn resource. The earlier Android 12 workaround overrides icon colors in values-v31, but the excerpt reports that system color changes do not update the launch icon until reinstall and disabling themed icons does not restore it. The excerpt is partial and does not establish broader compatibility details.

### 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: [Yahor Urbanovich](<https://devfeed.tech/sources/stories-by-yahor-urbanovich-on-medium.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [coroutines-flow](<https://devfeed.tech/topics/coroutines-flow.md>), [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [suspend function](<https://devfeed.tech/topics/suspend-function.md>), [runBlocking](<https://devfeed.tech/topics/runblocking.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>), [flow](<https://devfeed.tech/tags/flow.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [migration](<https://devfeed.tech/tags/migration.md>), [property](<https://devfeed.tech/tags/property.md>), [property-delegation](<https://devfeed.tech/tags/property-delegation.md>), [reading](<https://devfeed.tech/tags/reading.md>), [suspend](<https://devfeed.tech/tags/suspend.md>)

### AI overview

The excerpt presents Kotlin property delegates as a way to encapsulate single-value reads and writes while migrating from SharedPreferences to AndroidX DataStore Preferences. It highlights DataStore's built-in Flow and Coroutines support, compared with a SharedPreferences change-listener wrapper that emits through deprecated ConflatedBroadcastChannel before converting to Flow. The excerpt says DataStore exposes values as Flow and requires suspend functions; to read one value, the author uses Flow.first() inside runBlocking and wraps that logic in a delegate. DataStore keys can use generics, while SharedPreferences delegates need separate classes for primitive types because its getters and setters are typed. The excerpt ends before showing the final delegate implementation, so its details and limitations are not available.

### 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: [Yahor Urbanovich](<https://devfeed.tech/sources/stories-by-yahor-urbanovich-on-medium.md>)

Topics: [bottomsheet](<https://devfeed.tech/topics/bottomsheet.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [User Interfaces](<https://devfeed.tech/topics/user-interfaces.md>), [Android Auto](<https://devfeed.tech/topics/android-auto.md>)

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

### AI overview

For Compose 1.0.1, BottomSheetScaffold supports a persistent collapsed sheet through peekHeight, while ModalBottomSheetLayout does not. To animate content with the sheet, read BottomSheetState's currentValue and targetValue plus SwipeableState progress (from, to, fraction), then normalize the fraction so Collapsed maps to 0f and Expanded to 1f. Apply it to composable properties such as alpha or corner radius; the example uses 30.dp rounding when expanded. The author also cautions that bottomSheetState should be remembered when initializing rememberBottomSheetScaffoldState, since omitting remember can cause unexpected behavior after recomposition. The excerpt notes its guidance is based on Compose 1.0.1 and may change with later 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: [Yahor Urbanovich](<https://devfeed.tech/sources/stories-by-yahor-urbanovich-on-medium.md>)

Topics: [Google Play](<https://devfeed.tech/topics/google-play.md>), [Image](<https://devfeed.tech/topics/image.md>), [Tool](<https://devfeed.tech/topics/tool.md>)

Tags: [adobe-photoshop](<https://devfeed.tech/tags/adobe-photoshop.md>), [android](<https://devfeed.tech/tags/android.md>), [developer](<https://devfeed.tech/tags/developer.md>), [developer-experience](<https://devfeed.tech/tags/developer-experience.md>), [device](<https://devfeed.tech/tags/device.md>), [experience](<https://devfeed.tech/tags/experience.md>), [google-pixel](<https://devfeed.tech/tags/google-pixel.md>), [google-play](<https://devfeed.tech/tags/google-play.md>), [guidelines](<https://devfeed.tech/tags/guidelines.md>), [online](<https://devfeed.tech/tags/online.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>), [screenshot](<https://devfeed.tech/tags/screenshot.md>), [screenshots](<https://devfeed.tech/tags/screenshots.md>)

### AI overview

The author's do-it-yourself Photoshop workflow offers a free, fully customizable way to create Google Play screenshots when existing tools lack current device frames or sufficient control. They describe Screener as useful and customizable but unmaintained since 2018, while online services they tried restricted features, customization, cropping, or device support. The workflow uses clean device captures or Android System UI demo mode, then arranges mockups and short descriptions in a PSD, divides the canvas with Photoshop's Slice Tool, and exports separate images. The excerpt cites Google Play guidance to remove notifications and service-provider details, use full battery, Wi-Fi, and signal indicators, and provide at least four screenshots at a minimum 1080px resolution; portrait images should be at least 1080x1920. It recommends prioritizing the app UI in the first three screenshots.

### 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