Browse Source

Documentation for #1016

pull/1822/head
akurasov 3 years ago committed by GitHub
parent
commit
d6e6cf5e0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 17
      tutorials/Image_And_Icons_Manipulations/README.md

17
tutorials/Image_And_Icons_Manipulations/README.md

@ -260,6 +260,23 @@ fun main() = application {
<img alt="Window icon" src="window_icon.png" height="371" />
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:

Loading…
Cancel
Save