Hi!
I've noticed some strange behavior. Maybe it's a bug, or maybe I'm missing something.
For some reason, the window width gets limited to about 3/4 of the display width.
For a simple repro, I took the service-hilt module from the library and replaced FloatingScreen.kt with this:
package io.github.arthurkun.service.hilt.ui.floating
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.size
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
import androidx.lifecycle.viewmodel.compose.viewModel
import com.github.only52607.compose.service.dragServiceFloatingWindow
import io.github.arthurkun.service.hilt.ui.theme.ComposeFloatingWindowTheme
@Composable
fun FloatingScreen(
vm: FloatingViewModel = viewModel(),
) {
ComposeFloatingWindowTheme(darkTheme = false) {
Box(
modifier = Modifier
.size(500.dp)
.background(color = Color.Blue)
.dragServiceFloatingWindow() // this doesn't seem to affect
)
}
}
As a result, I get this:
The width is limited, but the height isn't.
I checked this on several devices, and it doesn't seem to depend on the API level or the device manufacturer.
Hi!
I've noticed some strange behavior. Maybe it's a bug, or maybe I'm missing something.
For some reason, the window width gets limited to about 3/4 of the display width.
For a simple repro, I took the
service-hiltmodule from the library and replacedFloatingScreen.ktwith this:As a result, I get this:
The width is limited, but the height isn't.
I checked this on several devices, and it doesn't seem to depend on the API level or the device manufacturer.