• Jason Ankers

    Jason Ankers

    1 year ago
    Do navigation routes have a length limit? seeing some weird behaviour where if my route is over a certain length (i.e.
    workouts/{id}/edit
    ) it navigates to the next shortest route instead (
    workouts/{id}
    )
    Jason Ankers
    i
    5 replies
    Copy to Clipboard
  • Deepak Gahlot

    Deepak Gahlot

    1 year ago
    Hi All, After updating to beta04 for compose. I'm seeing a lots of unresolved references regarding the Kotlin based ArrayList that i was using
    Deepak Gahlot
    s
    7 replies
    Copy to Clipboard
  • Yuri Drigin

    Yuri Drigin

    1 year ago
    Please help. Didn’t find way to make it. I need shadow with offset and alpha 0.08 but elevation don’t allow it. See attached
    Yuri Drigin
    BaoNguyen
    3 replies
    Copy to Clipboard
  • h

    Heikki Rauhala

    1 year ago
    In beta04 the keyboard navigation indeed works out of the box, but I find that if modifiers are in order
    Modifier.focusModifier().onFocusChanged { ... }
    , the
    onFocusChanged
    handler is not called, while if they're reversed
    Modifier.onFocusChanged { ... }.focusModifier()
    , it is called.
    h
    2 replies
    Copy to Clipboard
  • Daniele Segato

    Daniele Segato

    1 year ago
    Where can i find documentation / samples on compose for the web and desktop? What i found for the web wasn't what i expected coming from Android. Instead of using
    Box
    ,
    Row
    ,
    Column
    , it used functions like
    h1
    which are closer to html.
    Daniele Segato
    Colton Idle
    2 replies
    Copy to Clipboard
  • s

    ste

    1 year ago
    Hi all, not sure if this is the right channel. Given the following minimal code (not sure this is Android / Compose specific),
    class MainActivity : ComponentActivity() {
    
        override fun onCreate(savedInstanceState: Bundle?) {
            super.onCreate(savedInstanceState)
    
            setContent {
                var clicksAmount by remember { mutableStateOf(0) }
    
                fun onItemClick(index: Int): () -> Unit = { repeat(index) { clicksAmount++ } }
    
                BasicText(text = "Clicks: $clicksAmount")
                LazyRow(
                    contentPadding = PaddingValues(12.dp),
                    content = { items(listOf(1, 2, 3)) { Example(it, onItemClick(it)) } }
                )
            }
        }
    }
    
    @Composable
    fun Example(index: Int, onClick: () -> Unit) {
        Column(
            horizontalAlignment = Alignment.CenterHorizontally,
            modifier = Modifier.padding(top = 12.dp).clickable { onClick() }
        ) {
            Image(painterResource(android.R.drawable.star_on), contentDescription = null)
            BasicText(text = index.toString())
        }
    }
    I get a huge build error when trying to build it. By the way, the combination of
    by
    (
    var clicksAmount by
    ) and
    ++
    (
    clicksAmount++
    ) is the cause. For instance,
    var clicksAmount = remember { ... }
    or
    clicksAmount += 1
    builds just fine. Is this an issue? I tried to google but didn't find anything, probably missed the right keywords
    s
    1 replies
    Copy to Clipboard
  • aiidziis

    aiidziis

    1 year ago
    Is it possible to run Compose with older Android Gradle Plugin versions? Looks like 7.0.+ versions causes
    ./gradlew check
    to fail with weird lint errors we never had before.
    aiidziis
    Bryan Herbst
    2 replies
    Copy to Clipboard
  • p

    PHondogo

    1 year ago
    Hello! Is it possible to have 'ThreadLocal' anolog for compossibles? I need to put parameter of the composable function to such structure to be able to take it from subcomposables without passing it as parameter. Globals can't solve this, cause it is possible to call such function with different parameter values and each should hold it's own 'ThreadLocal' value.
    p
    orangy
    2 replies
    Copy to Clipboard
  • j

    james

    1 year ago
    If I have a suspend function with some important long running code, and want to trigger it from a composable function, what is the standard way to start this long running function so that it is not cancelled when the component recomposes? Not clear on how to use the effect stuff for this
    j
    1 replies
    Copy to Clipboard
  • Colton Idle

    Colton Idle

    1 year ago
    Is there any way to force all items in a Row to show? For example, if I have a row with text and a checkbox, then it looks good, but if the text is really long, it pushes the checkbox out of the row.
    Colton Idle
    Adam Powell
    5 replies
    Copy to Clipboard