• z

    zsperske

    1 year ago
    is there a way to achieve negative padding? I'm implementing swipe to dismiss on a list and while I want my list item's content to be padded from the edge, I would like the red bar which appears as you swipe to have no padding and emerge from the edge
    z
    1 replies
    Copy to Clipboard
  • Spikey Sanju

    Spikey Sanju

    1 year ago
    How to change the TextField text color in Jetpack Compose?
    val username = remember { mutableStateOf(TextFieldValue()) }
    TextField(
        modifier = Modifier.fillMaxWidth().padding(16.dp, 0.dp, 16.dp, 0.dp)
            .constrainAs(et_username) {
                top.linkTo(title.bottom, margin = 30.dp)
            },
        label = { Text(text = "Username") },
        leadingIcon = { Icon(Icons.Outlined.Person) },
        textStyle = typography.subtitle1,
        backgroundColor = MaterialTheme.colors.background,
        value = username.value,
        onValueChange = { username.value = it }
    )
    Spikey Sanju
    Dominaezzz
    +1
    3 replies
    Copy to Clipboard
  • ziv kesten

    ziv kesten

    1 year ago
    Having problems upgrading to compose alpah08. Project wont compile now with error:
    e: java.lang.NoSuchMethodError: e: java.lang.NoSuchMethodError:
    'org.jetbrains.kotlin.descriptors.DescriptorVisibility org.jetbrains.kotlin.descriptors.ClassConstructorDescriptor.getVisibility()'
    compose versons: compose_version = ‘1.0.0-alpha08’ nav_compose_version =‘1.0.0-alpha02’ paging_compose_version = ‘1.0.0-alpha02’ kotlin version = ‘1.4.20’ Tried invalidating caches, restart, restart AS, restart Whole machine.
    ziv kesten
    John O'Reilly
    +2
    6 replies
    Copy to Clipboard
  • t

    tieskedh

    1 year ago
    How to align two texts of different sizes by their top?
    Row {
        Text(
            "h4 text",
            style = MaterialTheme.typography.h4,
        )
        Text("my icon")
    }
    I saw that fontsize had a lineHeight, and a baselineshift. The thing I don't get is that the baselineshift is a multiplier. How can I compute the top with it? Or is there some other way?
    t
    Dominaezzz
    +2
    15 replies
    Copy to Clipboard
  • r

    robnik

    1 year ago
    Is there a good way to search the docs for given name/symbol from Jetpack Compose? For example, if I go to developer.android.com and search for "Text", all I get are two hits for org.w3c.dom.Text, and some other things - none of which are the Text composable.
    r
    t
    +1
    4 replies
    Copy to Clipboard
  • Nat Strangerweather

    Nat Strangerweather

    1 year ago
    I'm testing this part of the documentation: https://developer.android.com/jetpack/compose/state#stateless-composables The problem is that
    observeAsState
    comes up as Unresolved Reference. Any ideas? I tried importing
    import androidx.compose.runtime.livedata.observeAsState
    but
    livedata
    is Unresolved...
    Nat Strangerweather
    Adam Powell
    2 replies
    Copy to Clipboard
  • p

    Piotr

    1 year ago
    Hi, i have a question regarding rtl support, is it possible to disable item (in this case linear progress indicator) from changing? I have an issue, that when i change to from ltr to rtl, the progress indicator, also changes positions(so it displays progress from right), i would like to disable that Thanks
    p
    1 replies
    Copy to Clipboard
  • k

    Kshitij Patil

    1 year ago
    A Custom View implementing
    onTouchEvent
    to handle some gestures doesn't allow gestures when used in a Composable using
    AndroidView
    . It used to work with compose
    alpha04
    (the last time I checked this Custom View). Currently I'm using
    alpha07
    and it's not working anymore. I tried putting that View in a xml file and inflating that layout instead which also didn't work. When I write entire screen in xml and use this View, everything works fine.
    k
    1 replies
    Copy to Clipboard
  • s

    Sam

    1 year ago
    Is there any way to create a pinterest (waterfall) style layout in jetpack compose? Ideally there would be a
    lazyGridFor
    that could have multiple columns that don’t require even-height rows, but i’d settle for fully rendering if it’s currently possible

    https://user-images.githubusercontent.com/29085/56487936-b3bc2c00-6491-11e9-8493-bb89c4f00a92.png

    s
    Andrey Kulikov
    +1
    12 replies
    Copy to Clipboard
  • gbaldeck

    gbaldeck

    1 year ago
    Hi, I'm currently learning compose and am finishing up the Layouts codelab in the official docs. I am not a fan of how modifiers work, but it may be because I don't fully understand them yet. The main issue I have is this... order matters when placing modifiers, constraints flow right and size flows left. But how are you supposed to know if a constraint was changed or not? A good example is the padding and size modifiers example in the codelab. Padding does not change constraints, but size does. So placing padding before size and visa versa will have different results. It's not immediately apparent that padding does not change the constraints though. Unless there is something I'm missing, there isn't any way of knowing. With all the different types of modifiers that will be available, I can see loads of bugs arising from this. Is there any way to tell what constraints a modifier changes without looking at the source code?
    gbaldeck
    Adam Powell
    +2
    40 replies
    Copy to Clipboard