Hello. I am composing the app using only composabl...
# compose-wear
b
Hello. I am composing the app using only composable in my application.   Currently, there is one stumbling block, and when composing a screen without scrolling in a circular wear device, there is a phenomenon that items overflow start and end. If composable is not used, it would have been solved by using boxInset or circular activity, but how can do this with composable?  If you look at the player screen of YouTube Music, you can see that texts are properly applied to the start and end of screens. Does wear composable have this function? Currently, I set a guideline using the length of the inscribed rectangle, and apply the item not to exceed the guideline. Please let me know if there is a better way.
Copy code
BoxWithConstraints() {
    val absoluteValue = (maxWidth - (maxWidth / sqrt(2f)))/2

    ConstraintLayout(modifier = Modifier.fillMaxSize()) {
        val absoluteStartGuideline = createGuidelineFromAbsoluteLeft(absoluteValue)
y
There is a discussion on how to achieve BoxInset in Wear Compose above https://kotlinlang.slack.com/archives/C02GBABJUAF/p1634289368047400
I personally hate the square line that achieves at the top of the text, and the artificial sides. I'm still struggling to achieve decent layouts on Wear Devices (which is mostly all Round anyway), but I'm trying with mainly additional padding at the top and bottom and creative layout choices, like a round button or avatar icon at the top instead of wide full screen text.
j
The Modifier in the thread that Yuri pointed at is what we plan on offering as an alternative to BoxInsetLayout, but I think I would look to address this question in a different way and ask what you are looking to convey that is best achieved with non-scrolling content in a fillMaxRectangle approach. Our UX team guidance for producing content in a way that is natural on a wearable recommends having scrollable content and with top/bottom content padding from say the ScalingLazyColumn you can build a nice UX. Typically even if you don't want scrolling I would argue that it would be better to think about how best to do a Circular and Rectangular layout for your screens and with Compose it's easy to use the
Copy code
LocalConfiguration.current.isScreenRound
to decide how to layout.
✔️ 1