• Billy Newman

    Billy Newman

    1 year ago
    Hello all. I have a checkbox in a parent view, the parent view is padded on start by 16dp. The checkbox aligns with that padding. However the ripple on click of the checkbox is clipped on the left side. Struggling to figure out how to unbound the checkbox ripple. Any ideas?
    Billy Newman
    Artur Schwarz
    11 replies
    Copy to Clipboard
  • i

    Ink

    1 year ago
    How to pass object between @Composable screens?
    @Parcelize
    data class Post(
        val author: String,
        val title: String,
        val description: String,
        val reactionNumber: Int
    ) : Parcelable
    In my navigationController;
    composable(
        "PostDetails/{post}",
        arguments = listOf(
            navArgument("post") { type = NavType.ParcelableType(Post::class.java)}
        )
    ) {
        PostDetailsScreen(it.arguments?.get("post") as Post)
    }
    Now I get error: Parcelables don't support default values. Should I pass object using GSON ot this way is corretly? I heard that NavType.ParcelableType didn't work but right now it's implemented and developers can use it (?)
    i
    i
    +3
    10 replies
    Copy to Clipboard
  • Kyle Lehman

    Kyle Lehman

    1 year ago
    Has anyone encountered issues rendering
    @Preview
    composables in AS (currently Canary 15) with an error similar to this?
    java.lang.NoClassDefFoundError: androidx/lifecycle/runtime/R$id
    	at androidx.lifecycle.ViewTreeLifecycleOwner.set(ViewTreeLifecycleOwner.java:49)
    	at androidx.compose.ui.tooling.preview.ComposeViewAdapter.init(ComposeViewAdapter.kt:612)
    	at androidx.compose.ui.tooling.preview.ComposeViewAdapter.<init>(ComposeViewAdapter.kt:206)
    	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    This is only happening for some members on our team but once it does its persistent and the only way to get it to compile is add the following dependencies which doesnt seem necessary:
    androidx.savedstate:savedstate-ktx
    androidx.lifecycle:lifecycle-viewmodel-compose
    androidx.lifecycle:lifecycle-runtime-ktx
    androidx-core-ktx
    Kyle Lehman
    Chris Sinco [G]
    +5
    23 replies
    Copy to Clipboard
  • s

    Sergey B

    1 year ago
    Hi everyone. I have a quick question about clipping the content by composables. If I'm not mistaken, composables don't clip content by default, but in code bellow it seems it clips content of the inner box. Am I doing something wrong? (code in thread)
    s
    Zach Klippenstein (he/him) [MOD]
    4 replies
    Copy to Clipboard
  • Scott Kruse

    Scott Kruse

    1 year ago
    Is there any particular reason there isn't a dedicated keynote for Compose at GoogleIO this year? just not quite ready? i noticed a few workshops but was hoping this IO would be compose heavy
    Scott Kruse
    Adam Powell
    +2
    5 replies
    Copy to Clipboard
  • b

    Bradleycorn

    1 year ago
    Given this:
    Row(modifier = Modifier
            .fillMaxWidth()
            .wrapContentHeight()) {
            
            Surface() {
                Text(...)           
            }
            
            Column {
                Text(...)
                Text(...)
                Text(...)
            }
        }
    How do I get the
    Surface
    to be the same height as the
    Column
    ?
    b
    l
    +3
    8 replies
    Copy to Clipboard
  • Nthily

    Nthily

    1 year ago
    Does anyone know how I should customize the
    SelectionContainer
    interface?
    Nthily
    Siyamed
    16 replies
    Copy to Clipboard
  • Ravi

    Ravi

    1 year ago
    hi I'm using navigation compose & my requirement is to have startDestination as list or detail page. Got no issues with list but for detail I need to pass detail id, more in the thread
    Ravi
    i
    18 replies
    Copy to Clipboard
  • Zach Klippenstein (he/him) [MOD]

    Zach Klippenstein (he/him) [MOD]

    1 year ago
    Compose doesn’t differentiate between touch mode vs not-touch mode focus, right? Does Compose’s focus model just assume keyboard navigation isn’t a thing? I don’t see anything in the implementation of Material
    Button
    that interacts with the focus system.
    Zach Klippenstein (he/him) [MOD]
    jim
    +1
    10 replies
    Copy to Clipboard
  • f

    Fabio

    1 year ago
    Hi, I'm running the
    AnimatingCircleTests
    from the
    Rally
    sample app, and after creating an emulator with 420 dpi I can't seem to troubleshoot the reason the tests are failing. According to the logs I tried creating there should be temporary files created at
    /data/data/com.example.compose.rally/files
    but that folder seems to never get created, so the question is • how should I compare the golden image to the actual screenshot generated during the test?
    f
    1 replies
    Copy to Clipboard