• Shakil Karim

    Shakil Karim

    1 year ago
    Hi, Does anyone know how I can disable Split mode which is the default option, to Code only in Android Studio?
    Shakil Karim
    j
    5 replies
    Copy to Clipboard
  • m

    Mark Murphy

    1 year ago
    Is there a pattern for use by libraries of composables, so the library knows how to create composables from the app's design system? I am not worried about simple parent-child relationships, where we can get away with a
    content
    composable lambda. I am more worried about cases where the library itself should be calling composable functions for certain roles, but it has no a priori way of knowing what those functions are. For example, if a library wants to render a button, it needs some composable for that. But
    Button()
    is a Compose Material thing, and the argument made here on several occasions is that Compose Material is just one possible design system. Somehow, the library needs a way to know "this is how I build a button", in such a way that it uses the app's chosen design system. Do we have a pattern for doing this? For apps themselves, they can simply use the right composable functions, but published libraries do not have that option, as they will be used by many apps. My fear is that, in the absence of such a pattern, libraries will tend towards "you can have any design system you want, so long as it is Compose Material".
    m
    Adam Powell
    +3
    33 replies
    Copy to Clipboard
  • v

    Vincent Williams

    1 year ago
    When I add this to my project
    buildFeatures {
            compose = true
        }
    I get the following error:
    com.intellij.openapi.externalSystem.model.ExternalSystemException: Could not create task ':app:compileDebugKotlin'.
    org/jetbrains/kotlin/gradle/tasks/KotlinCompile
    Any ideas why? Im trying to use compose alpha 10 on the latest canary AS and kotlin 1.4.21
    v
    Timo Drick
    3 replies
    Copy to Clipboard
  • p

    Photoxor

    1 year ago
    The behavior of
    Popup
    has changed in alpha11. Width is now limited to parent width. Is this intended?
    p
    matvei
    +2
    9 replies
    Copy to Clipboard
  • Archie

    Archie

    1 year ago
    Hi @Doris Liu, I was reading around Transition Samples and found this:
    @Composable
    fun PoppingInCard() {
        // Creates a transition state with an initial state where visible = false
        val visibleState = remember { MutableTransitionState(false) }
        // Sets the target state of the transition state to true. As it's different than the initial
        // state, a transition from not visible to visible will be triggered.
        visibleState.targetState = true
        ...
    }
    I was wondering whether doing:
    visibleState.targetState = true
    is fine? Like to create an "Intro Animation"? or is it better to put that inside a
    SideEffect
    ? or is there a better way?
    Archie
    Doris Liu
    27 replies
    Copy to Clipboard
  • Rafs

    Rafs

    1 year ago
    Is there any update on supporting transitions in compose-navigation
    Rafs
    Doris Liu
    +2
    5 replies
    Copy to Clipboard
  • Hatice Sarp

    Hatice Sarp

    1 year ago
    In alpha-09 and compose paging alpha-05, I was collecting like in the code snippet below:
    val paginatedBlockedUsers = settingsViewModel.fetchBlockedUsers().collectAsLazyPagingItems()
     LazyColumn {
        itemsIndexed(paginatedBlockedUsers) { index, item ->
            if (item != null) {
                UserListItem(
                    item = item
                )
            }
        }
    After upgrading from Alpha 9 to Alpha 11 when paging is on alpha-05, I get following error:
    one of the following functions can be called with the arguments supplied:
    public inline fun <T> LazyListScope.itemsIndexed(items: Array<TypeVariable(T)>, crossinline itemContent: LazyItemScope.(index: Int, item: TypeVariable(T)) -> Unit): Unit defined in androidx.compose.foundation.lazy
    public inline fun <T> LazyListScope.itemsIndexed(items: List<TypeVariable(T)>, crossinline itemContent: LazyItemScope.(index: Int, item: TypeVariable(T)) -> Unit): Unit defined in androidx.compose.foundation.lazy
    How do I use .collectAsLazyPagingItems() and itemsIndexed(paginatedItem) { index, item -> } in alpha 11 ?
    Hatice Sarp
    Cyril Find
    4 replies
    Copy to Clipboard
  • s

    Se7eN

    1 year ago
    I'm getting a crash when doing this:
    val items = viewModel.items.collectAsState(initial = listOf())
    LazyColumn {
        items(items.value.size) { index ->
            ...
        }
    }
    But if I do
    val items = viewModel.items.collectAsState(..).value
    and
    items(items.size)
    , it works fine. Why doesn't the first snippet work?
    s
    Cyril Find
    4 replies
    Copy to Clipboard
  • Yasin Kaçmaz

    Yasin Kaçmaz

    1 year ago
    Hi, does LazyGrid have span strategy. I' ve asked a question at Stackoverflow: https://stackoverflow.com/questions/65981114/does-jetpack-composes-lazyverticalgrid-have-span-strategy We can change grid count dynamically, but I want to have a full width footer when loading happens. Is there a way I can set span count for specific item?
    Yasin Kaçmaz
    1 replies
    Copy to Clipboard
  • d

    darkmoon_uk

    1 year ago
    Is anyone running Instrumented Tests against Compose Layouts... or doing so in Firebase Test Lab?
    d
    2 replies
    Copy to Clipboard