• John O'Reilly

    John O'Reilly

    1 year ago
    In SwiftUI if you do something like following (no params to
    padding()
    then default system padding values are used (using
    Modifier.padding()
    ). In Compose it looks like
    0dp
    is used if no parameters are passed. Would be nice I think to use SwiftUI's approach here..
    VStack {
        ....
    }
    .padding()
    John O'Reilly
    Bryan Herbst
    +2
    23 replies
    Copy to Clipboard
  • r

    robnik

    1 year ago
    Is there a way to tell
    Text
    to wrap to a second line to avoid pushing things off screen? Inside a screen-wide Column I have:
    Row {
       Text("A somewhat long line that needs to wrap probably")
       Spacer(Modifier.width(3.dp))
       Switch(model.foo, { model.foo = it })
    }
    The Text and Switch are overlapping a bit, and the Switch half pushed off screen.
    r
    Vadim
    +1
    7 replies
    Copy to Clipboard
  • John O'Reilly

    John O'Reilly

    1 year ago
    Next up on SwiftUI/Compose comparison 🙂 ....in SwiftUI I can apply a font to all
    Text
    elements within something like
    HStack
    as shown below. Is anything similar possible right now with Compose (or planned)?
    HStack {
        Text("some text")
        Text("some more text")
    }
    .font(.caption)
    John O'Reilly
    Bryan Herbst
    +1
    5 replies
    Copy to Clipboard
  • z

    zoha131

    1 year ago
    Iike
    suspend
    if something goes wrong inside
    composable
    function and app crashes then AS don’t provide any fatal error in the logcat. Is there any way to get the fatal report from AS?
    z
    gildor
    5 replies
    Copy to Clipboard
  • Dominaezzz

    Dominaezzz

    1 year ago
    Has anyone tried
    LazyColum(reverseLayout=true)
    with
    VerticalScrollbar(...)
    ? (Mine goes in the wrong direction)
    Dominaezzz
    1 replies
    Copy to Clipboard
  • d

    Denis

    1 year ago
    How to properly use
    Modifier.scale
    (or
    .graphicsLayer
    with scaleX/scaleY parameters)? Here's a sample code:
    @Preview
    @Composable
    fun TestScale() {
        Row(Modifier.fillMaxSize()) {
            val origin0 = TransformOrigin(0f, 0f)
            Box(Modifier.graphicsLayer(scaleX = .5f, scaleY = .5f, transformOrigin = origin0)) {
                SomeComposable(Color.Cyan)
            }
            Box(Modifier.graphicsLayer(scaleX = 2f, scaleY = 2f, transformOrigin = origin0)) {
                SomeComposable(Color.Green)
            }
            Box(Modifier.graphicsLayer(scaleX = 3f, scaleY = 3f, transformOrigin = origin0)) {
                SomeComposable(Color.Yellow)
            }
        }
    }
    
    @Composable
    fun SomeComposable(color: Color) {
        Box(modifier = Modifier.background(color).padding(16.dp)) {
            Text("OK")
        }
    }
    I want it to draw 3 boxes side-by-side but it looks like it doesn't respect scale at all. And there are those original size wireframes drawn when you hover over the the boxes. Do I need to write a custom layout or is there anything wrong with my code?
    d
    r
    4 replies
    Copy to Clipboard
  • m

    Madhava

    1 year ago
    Hi all!! I just wanted to say Thank You to everyone here who helped make JetPack Compose and get it stable with the recent releases. I have launched an app which I just built with alpha-09 https://play.google.com/store/apps/details?id=au.net.swc.calc&hl=en&gl=US It was risky starting this app at the start of the year not knowing when Jetpack Compose would be stable, and then COVID hit but I stuck with it instead of re-writing and im proud to say it basically works and its fairly stable and its all the time and budget I had to invest in it.
    m
    Colton Idle
    2 replies
    Copy to Clipboard
  • Chethan

    Chethan

    1 year ago
    How to give character limit to OutlinedTextField or TextField ?? I do not see this attribute to set
    Chethan
    Saurabh Thorat
    2 replies
    Copy to Clipboard
  • Afzal Najam

    Afzal Najam

    1 year ago
    Now that I'm trying to convert from my own navigation code (based on https://github.com/android/compose-samples/blob/main/JetNews/app/src/main/java/com/example/jetnews/ui/Navigation.kt), to navigation-compose. I'm finding all these navigate() calls to be somewhat non-declarative. Anyone else feel this way?
    Afzal Najam
    r
    4 replies
    Copy to Clipboard
  • l

    len

    1 year ago
    Why is
    FlowRow
    being removed? It felt nice for things like a list of chips. Is a replacement planned? I don't really like the idea of creating a custom layout for it.
    l
    m
    +2
    5 replies
    Copy to Clipboard