https://kotlinlang.org logo
Docs
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
compose
  • j

    Joseph Hawkes-Cates

    11/16/2022, 9:36 PM
    I’m seeing some interesting behavior with
    remember
    in a few of our screens. Essentially I have multiple “Screen” level composables which store a remembered value in a val and the val has the same name in all of those composables. This results in the remembered value actually being shared across these screens as I navigate between them. Is this expected? 🧵
    d
    i
    • 3
    • 21
  • s

    stack

    11/17/2022, 4:38 AM
    Hi guys, I'm using a compose TextField I want to paste text at the beginning of a word But when i long press cursor, (or tap the blob under the cursor) the word after cursor is selected instead of exposing the context menu how do i do?
  • a

    Aldi Kitta

    11/17/2022, 4:44 AM
    Hi, is there any references to implement dynamic locale app language, like whatsapp do. (It can use the system anguage but also we can change it too, to custom language, (not following the system language))
    s
    • 2
    • 1
  • j

    Joseph Hawkes-Cates

    11/17/2022, 5:01 AM
    This question could go in #android or here, but I’m looking for resolutions specific to a compose only app so I’ll post here. We’re seeing an issue in our app around Deeplink navigation. We’ve set up our app to be opened by links to our web app on Android. We decided we wanted the launchMode of our activity to be
    singleTask
    so that our app does not have multiple instances running in different tasks. When we open a task we are seeing two instances of our Activity being created which has lead to some issues. More in 🧵
    i
    • 2
    • 9
  • x

    xxfast

    11/17/2022, 6:40 AM
    There was an video about showing a button to scroll to top when you reach the bottom of the list, i'm having hard time finding which video this is. Anyone has any clue? It was one of the performance improvement videos
    c
    • 2
    • 3
  • m

    mattinger

    11/17/2022, 6:56 AM
    So i'm trying to implement a search bar using a custom wrapper for BottomSheetScaffold along with my own custom search bar state (similar to SnackbarData and SnackbarHostState). I've got it all working, but the keyboard is covering up my confirm button. Is there a way at the composable level to tell the composable to resize when the keyboard is shown? I really don't want to have to do this at the activity level, as we don't necessarily always want that behavior.
    o
    • 2
    • 4
  • e

    Elio Maroun

    11/17/2022, 7:35 AM
    I have nested graphs for navigation in jetpack cpmpose, I am getting this error:
  • e

    Elio Maroun

    11/17/2022, 7:35 AM
    java.lang.IllegalArgumentException: Navigation destination that matches request NavDeepLinkRequest{ uri=android-app://androidx.navigation/appointments } cannot be found in the navigation graph NavGraph(0x7c328b99) route=authGraph startDestination={Destination(0xa0a5cfdc) route=Login}
  • e

    Elio Maroun

    11/17/2022, 7:36 AM
    ANY idea how to solve it, since I am not opening any link just navigating between the login and entering the main view on success
    p
    • 2
    • 2
  • e

    Elio Maroun

    11/17/2022, 8:06 AM
    @Composable
    fun OnBoardingGraph(navController: NavHostController) {
        NavHost(
            navController = navController,
            route = NavGraph.AuthGraph,
            startDestination = Login.route
        ) {
            composable(Login.route) {
                LoginPage(viewModel = getViewModel { parametersOf(navController) })
            }
            composable(ForgotPassword.route) {
                ForgotPasswordPage()
            }
            composable(ResetPassword.route) {
                ResetPasswordPage()
            }
    
        }
    
    }
  • e

    Elio Maroun

    11/17/2022, 8:06 AM
    fun NavGraphBuilder.mainPagesNavGraph(
        navController: NavHostController
    ) {
        navigation(
            startDestination = Appointments.route,
            route = NavGraph.MainPagesGraph
        ) {
            composable(
                route = Appointments.route
            ) {
                AppointmentsPage(viewModel = getViewModel { parametersOf(navController) })
            }
            composable(route = Agenda.route) {
                AgendaPage()
            }
            composable(route = Patients.route) {
                PatientListPage(viewModel = getViewModel { parametersOf(navController) })
            }
            composable(route = Search.route) {
                SearchPage()
            }
        }
    }
  • c

    czuckie

    11/17/2022, 8:28 AM
    Is there anyway to force recomposition in tests? I want to ensure something is executed as a
    LaunchedEffect
    but I can't find a way to emphasise that with a test.
    h
    z
    • 3
    • 6
  • k

    KotlinLeaner

    11/17/2022, 9:23 AM
    Hi, I am using MutableStateFlow in my jetpack compose. Like below
    val isBluetoothEnabled = MutableStateFlow(false)
    whenever I tried to use the value of variable like this
    .value
    i.e.
    isBluetoothEnabled.value
    . So I am trying to use delegate property to avoid using
    .value
    val isBluetoothEnabled by MutableStateFlow(false)
    but I am getting weird error
    Type 'MutableStateFlow<TypeVariable(T)>' has no method 'getValue(PairViewModel, KProperty<*>)' and thus it cannot serve as a delegate
    m
    • 2
    • 5
  • p

    PHondogo

    11/17/2022, 9:32 AM
    Hello! I have a button and a text right to the button in a row. How can I make text flow under the button but only for those lines that overflow. First lines with sum height as button height must stay right to the button.
    z
    r
    • 3
    • 3
  • a

    Alexandru Hadăr

    11/17/2022, 10:01 AM
    Are there any downsides/ performance impacts when using Generic composable function? e.g
    @Composable
    fun <T> CardList(
        items: List<T>,
    ) {
        // TODO Draw your list here.
    }
    m
    z
    • 3
    • 2
  • l

    Lisandro Di Meo

    11/17/2022, 12:12 PM
    Im working with a Canvas, but once it drawn, it redraws every composition, causing non desirable effects. Anyone know how to avoid this kind of situation?
    n
    l
    • 3
    • 10
  • a

    AmrJyniat

    11/17/2022, 2:13 PM
    Is there anything like
    onPageChangedListener()
    in
    HorizontalPager
    Accompanist? I want to trigger some function when the user swiping to another page.
    c
    • 2
    • 2
  • o

    Othman El Jazouli

    11/17/2022, 2:27 PM
    I’m trying to have a dynamic modal bottom sheet, based on the user selected
    var selectedUser: String? by remember {
       mutableStateOf(null)
    }
    
    ModalBottomSheetLayout(
        sheetState = sheetState,
        sheetContent = {
            selectedUser?.let {
                UserDetail(
                    id = selectedUser, 
                    onCloseClick = {
                        coroutineScope.launch {
                            sheetState.hide()
                            selectedUser = null
                        }
                    }
                )
            } ?: Box(modifier = Modifier.fillMaxSize())
        },
    ) { 
    ... 
        coroutineScope.launch {
            selectedUser = "userid"
            sheetState.show()
        }
    }
    I added the default
    Box
    because otherwise there is an exception
    java.lang.IllegalArgumentException: The initial value must have an associated anchor.
    so my questions is do you guys think this is the right way of making a dynamic modal bottom sheet or is there a better way without going through the Box? (I know I could use scaffold but I don’t want interaction with the main screen)
    h
    j
    m
    • 4
    • 14
  • o

    Oliver.O

    11/17/2022, 3:00 PM
    Headless concurrent Compose testing and
    Snapshot
    multi-threading: "_Reading a state that was created after the snapshot was taken or in a snapshot that has not yet been applied_". Details in 🧵.
    z
    • 2
    • 10
  • g

    Gabriele Lizzos

    11/17/2022, 8:07 PM
    can someone help me with this compose error? Kotlin version : 1.7.20 compose version : 1.2.0 java : 11
    Kotlin: [Internal Error] java.lang.IllegalStateException: The provided plugin androidx.compose.compiler.plugins.kotlin.ComposeComponentRegistrar is not compatible with this version of compiler
    at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.registerExtensionsFromPlugins$cli(KotlinCoreEnvironment.kt:664) at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$ProjectEnvironment.registerExtensionsFromPlugins(KotlinCoreEnvironment.kt:169) at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.configureProjectEnvironment(KotlinCoreEnvironment.kt:566) at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment.<init>(KotlinCoreEnvironment.kt:199) at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment.<init>(KotlinCoreEnvironment.kt:108) at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.createForProduction(KotlinCoreEnvironment.kt:445) at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.createCoreEnvironment(K2JVMCompiler.kt:192) at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:143) at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:53) at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:99) at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:47) at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:101) at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1571) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:359) at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200) at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196) at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:562) at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:796) at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:677) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:676) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: java.lang.AbstractMethodError: Receiver class androidx.compose.compiler.plugins.kotlin.ComposeComponentRegistrar does not define or inherit an implementation of the resolved method 'abstract void registerProjectComponents(com.intellij.mock.MockProject, org.jetbrains.kotlin.config.CompilerConfiguration)' of interface org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar. at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.registerExtensionsFromPlugins$cli(KotlinCoreEnvironment.kt:656) ... 29 more
    k
    z
    m
    • 4
    • 5
  • m

    Mehdi Haghgoo

    11/17/2022, 8:39 PM
    Is Navigation Animation from Accompanist going to be merged to Compose any time soon?
    a
    c
    +2
    • 5
    • 9
  • a

    Andrea

    11/17/2022, 10:05 PM
    Hello! I have an advice regarding compose navigation and bottom nav bar. For example, I have two main roots (A, B) in the bottom nav, and based on the documentation I navigate between them using the saveState and restoreState (https://developer.android.com/jetpack/compose/navigation#bottom-nav). Each main root screen has their own Viewmodel, which are saved and restored each time I navigate A -> B and B -> A. I would like to call a refreshState every time I come back to A (the fun would simply update the VM UI state and re fetch data for some properties). I have found some workarounds but I do not like them a lot. Are there any specific recommendations / suggestions for these cases? I could probably avoid the saveState but I do not want to recreate the VM each time I navigate back to the viewmodel A. Thanks!
    j
    d
    • 3
    • 5
  • w

    wck

    11/18/2022, 3:41 AM
    Hi everyone, does Compose has anything to offer for testing hybrid layouts inside a Fragment? Current test is written in
    FragmentScenario
    so there is no concept of an
    Activity
    so I guess
    createAndroidComposeRule
    won’t be useful as it only takes activity.
    z
    • 2
    • 4
  • g

    gowtham 6674

    11/18/2022, 6:30 AM
    Hi, How to show this default full size text field on the landscape mode in compose. In xml by default it opens this view when I click edittext on landscape mode.
    z
    • 2
    • 2
  • o

    oday

    11/18/2022, 10:15 AM
    so I have a LazyColumn, with
    items
    , and when something happens to one of the items’ onClick (defined in itemContent), I want the
    items
    value to change, the list to be shuffled, re-ordered, etc.. how can I do that ?
    j
    m
    • 3
    • 16
  • l

    loloof64

    11/18/2022, 12:55 PM
    Hi ! I'm trying to define a squared component. So that the component's size is always a square based on the minimum of its {maxWidth, maxHeight} constraints, and keeping its original location in the parent composable. So I've tried to define a modifier called
    clipAsMinimumSquare
    , but in the preview it seems that the composable to which I'm calling this modifier is still a rectangle, whereas its content is a square. As you can see from the code, I'm calling
    layout
    on the
    Modifier
    , but it seems that I've not defined it well.
    ChessBoard.kt
    e
    • 2
    • 2
  • c

    czuckie

    11/18/2022, 2:18 PM
    why does
    animateColorAsState
    break my
    @Preview
    in Flamingo?
    j
    e
    • 3
    • 8
  • z

    zt

    11/18/2022, 2:42 PM
    I'm using the 1.1.0-alpha02 version of the material 3 library. I want to use the swipeable modifier but it's marked as internal, what can I do? I'd like to be able to use it now rather than wait an unknown amount of time
    j
    • 2
    • 3
  • j

    Joseph Hawkes-Cates

    11/18/2022, 3:45 PM
    We’re having a style discussion on my team and I thought I’d crowd source it. We have a composable which is conditionally shown. You can assume this isn’t for a library with a large user base and we don’t have any need to do animation or transitions in this case. Which of these options would you prefer: • A. Encapsulate the conditional display within the composable itself so all consumers get that logic included • B. All consumers should conditionally show/hide the composable by not calling it when they don’t need it • C. Make visibility a parameter for the composable as a compromise between A and B. • D. It depends and none of these are more “right” than the other. See example code in 🧵
    j
    s
    +2
    • 5
    • 8
  • d

    David Corrado

    11/18/2022, 3:51 PM
    What is the alternative to intrinsics. I am getting an error with using it with a complex view which does not support intrinsics
    k
    z
    • 3
    • 13
Powered by Linen
Title
d

David Corrado

11/18/2022, 3:51 PM
What is the alternative to intrinsics. I am getting an error with using it with a complex view which does not support intrinsics
Java.lang.IllegalStateException: Asking for intrinsic measurements of SubcomposeLayout layouts is not supported. This includes components that are built on top of SubcomposeLayout, such as lazy lists, BoxWithConstraints, TabRow, etc. To mitigate this: - if intrinsic measurements are used to achieve 'match parent' sizing,, consider replacing the parent of the component with a custom layout which controls the order in which children are measured, making intrinsic measurement not needed - adding a size modifier to the component, in order to fast return the queried intrinsic measurement.
I am not trying to do match parent and size isnt going to work for me
k

Kirill Grouchnikov

11/18/2022, 4:07 PM
“What is the alternative to intrinsics” - what is it that you’re trying to do? It’s difficult to suggest an alternative without any context.
d

David Corrado

11/18/2022, 4:25 PM
Here is the example using intrinsics. If I use MarxistRow. Then inside have a BoxWithConstraints like below it crashes
BoxWithConstraints(
    modifier = Modifier
        .fillMaxWidth()
) {
    val maxWidth = with(LocalDensity.current) {
        constraints.maxWidth.toDp()
    }
    Column {
        Text(
            modifier = Modifier.padding(bottom = 2.dp),
            text = "Test",
        )
    }
}
https://gist.github.com/zach-klippenstein/a68b75567d36e1f8e6f11dc6f6e5caf4
The example of using BoxWithConstraints is trivial but I have a bunch of things that violate the intrinsics limitations. So want to know what the alternative for intrinsics is to solve the same use case that marxistrow
k

Kirill Grouchnikov

11/18/2022, 4:33 PM
But again, what is the use case?
d

David Corrado

11/18/2022, 4:36 PM
I want to wrap everything with MarxistRow. The reason why I need that is https://kotlinlang.slack.com/archives/CJLTWPH7S/p1668110705848269?thread_ts=1668110653.982419&amp;cid=CJLTWPH7S So maybe is it possible to create the MarxistRow without intrinsics
z

Zach Klippenstein (he/him) [MOD]

11/18/2022, 7:56 PM
It’s not, efficiently. It uses them for a reason.
k

Kirill Grouchnikov

11/18/2022, 7:58 PM
I don’t think you can create a general-purpose container that can host any possible child composables, unless you have something “trivial” like a
Box
.
And again, I’m still not clear on what is the use case. Wrapping everything in a certain container composable is a solution, but what is the problem?
d

David Corrado

11/18/2022, 8:55 PM
Yeah I guess I am looking for a general purpose container which like you said is not possible. Essentially I want a row that lays out the components like it was done in the above kotlin slack(Which has the use case). So I want to use that new row instead of the existing row in compose. Sounds like its just not possible
k

Kirill Grouchnikov

11/18/2022, 8:58 PM
At some point you will run into a circular problem along the lines of “the parent will expand to fit the tallest child, while the only child wants to be exactly half as tall as the parent”, or nesting scrollable containers, or any other similar loop where the parent needs info from the children to lay them out, and the children need info from the parent to decide how much space they want.
View count: 14