diff --git a/tutorials/Image_And_Icons_Manipulations/README.md b/tutorials/Image_And_Icons_Manipulations/README.md index 8313224a97..653db7a3e0 100755 --- a/tutorials/Image_And_Icons_Manipulations/README.md +++ b/tutorials/Image_And_Icons_Manipulations/README.md @@ -260,6 +260,23 @@ fun main() = application { Window icon +In case of `singleWindowApplication` usage, you can use the following approach: + +```kotlin +import androidx.compose.material.Text +import androidx.compose.ui.graphics.painter.BitmapPainter +import androidx.compose.ui.res.loadImageBitmap +import androidx.compose.ui.res.useResource +import androidx.compose.ui.window.singleWindowApplication + +fun main() { + val icon = BitmapPainter(useResource("sample.png", ::loadImageBitmap)) + singleWindowApplication(icon = icon) { + Text("Hello World!") + } +} +``` + ## Setting the application tray icon You can create a tray icon for your application: