• Fudge

    Fudge

    1 year ago
    Looking at
    compose-navigation
    , it seems like the api is quite akward to use. It requires predefining routes with Strings, and then specifying those Strings again when you want to navigate to those routes. And then passing parameters into the routes is a whole world of complication. What will you do when you need to pass real objects? Serialization? Why not a solution that looks like this, in the way Flutter did it?
    onClick = { navigate { TheOtherComposable(obj1, obj2) } }
    Fudge
    i
    +1
    5 replies
    Copy to Clipboard
  • z

    zoha131

    1 year ago
    is there any Date/Time picker for compose?
    z
    1 replies
    Copy to Clipboard
  • manueldidonna

    manueldidonna

    1 year ago
    The app should not search immediately when the text changes, but only after an interval.
    var result by remember { mutableStateOf(emptyList<String>()) }
    val (query, changeQuery) = remember { mutableStateOf("") }
    LaunchedEffect(subject = query) {
        delay(300L)
        stations = getResultFromWebServer(query)
    }
    BasicTextField(value = query, onValueChange = changeQuery)
    Is this the correct way to do it?
    manueldidonna
    z
    +2
    8 replies
    Copy to Clipboard
  • Hitanshu Dhawan

    Hitanshu Dhawan

    1 year ago
    Hey, I want to access
    MaterialTheme.colors.background
    inside my
    transitionDefinition
    but I as this function is not marked with
    @Composable
    I am getting this error
    @Composable invocations can only happen from the context of a @Composable function
    Is the
    transitionDefinition
    function made non-composable on purpose? How can I make access these values inside
    transitionDefinition
    ? My use case is to have different values for light and dark theme. Something like this…
    private val SomeTransitionDefinition = transitionDefinition<SomeState> {
        state(SomeState.State1) {
            this[backgroundColor] = if (MaterialTheme.colors.isLight) MaterialTheme.colors.primary else MaterialTheme.colors.secondary
        }
    }
    Hitanshu Dhawan
    Doris Liu
    4 replies
    Copy to Clipboard
  • v

    Vincent tiensi

    1 year ago
    Hi! Sorry I have a dumb question but can’t seem to figure it out. I created a reuseable listing component for pagination here
    fun <T> VerticalListingComponent(
        itemList: List<T>,
        loading: Boolean,
        loadNextPage: () -> Unit
    )
    and am calling it through this
    VerticalListingComponent(
        itemList = itemListingState.listings,
        loading = itemListingState.loading,
        {}
    )
    When I update the itemListingState the VerticalListingComponent seems to be consuming and displaying the new itemList properly, but it seems to be ignoring the loading boolean that I’m passing (I have a loading indicator that shows when loading = true). Does anyone know what I’m doing wrong?
    v
    1 replies
    Copy to Clipboard
  • l

    len

    1 year ago
    Is there an existing implementation of a modifier/component to reorder the elements of a LazyColumn with a drag handle?
    l
    d
    5 replies
    Copy to Clipboard
  • j

    Jrichards1408

    1 year ago
    Hi, is there a jetpack compose component that loads images from a url like picasso?
    j
    a
    +2
    5 replies
    Copy to Clipboard
  • Rafs

    Rafs

    1 year ago
    Is there a way to get an undecorated TextField in compose?
    Rafs
    ppvi
    2 replies
    Copy to Clipboard
  • Yahor

    Yahor

    1 year ago
    Hello. Has anyone has an sample multi-module project with enabled Compose in some module? I'm trying to migrate some feature to Compose and project can't build at all. As I know, compose has a conflict with kapt and kotlin-android-extensions, but I don't have this one in project.
    Yahor
    Jeremy
    2 replies
    Copy to Clipboard
  • j

    Jrichards1408

    1 year ago
    anyone came across this error before in compose?
    j
    Yann Badoual
    +2
    19 replies
    Copy to Clipboard