• k

    Kazemihabib1996

    2 years ago
    I've seen the word
    subcomposition
    multiple times in slack, what does it mean?
    k
    1 replies
    Copy to Clipboard
  • Timo Drick

    Timo Drick

    2 years ago
    How should touch drag gesture consumption work? I have following problem. I do have e.g.: A scrollable list and each element can be swiped. The problem now is that both gestures are detected at the same time. But i want to stop detecting the swipe gesture when the user is scrolling and vice versa. Here is a sample (A little bit simplified just using Vertical/HorizontalScroller to demonstrate the problem:
    VerticalScroller() {
        Column(Modifier.padding(10.dp)) {
            for (i in 0..50) {
                Box(backgroundColor = if (i % 2 == 0) Color.LightGray else Color.Gray) {
                    HorizontalScroller(()) {
                        Row {
                            for (j in 0..10) {
                                Text("i: $i element $j", Modifier.padding(20.dp))
                            }
                        }
                    }
                }
            }
        }
    }
    Timo Drick
    matvei
    4 replies
    Copy to Clipboard
  • bohregard

    bohregard

    2 years ago
    Anyone have any ideas why during build I get an error related to SurfaceView unresolved reference:
    @Composable
    fun buildUi() {
        Column(
            modifier = Modifier.fillMaxSize(),
            horizontalGravity = Alignment.CenterHorizontally
        ) {
            SurfaceView(ContextAmbient.current)
        }
    }
    bohregard
    l
    +2
    14 replies
    Copy to Clipboard
  • d

    dagomni

    2 years ago
    Hi! Is there an alternative in Compose Text for TextView's autoSize text scaling?
    d
    l
    +2
    30 replies
    Copy to Clipboard
  • k

    kagomez

    2 years ago
    Hey guys 😄 I’ve been testin Compose and I have a question, how do you draw a shadow into an Image??
    k
    r
    11 replies
    Copy to Clipboard
  • a

    Antanas A.

    2 years ago
    Hello, Is it possible to try out compose without android itself? I mean just somehow use only compose core where I can write @Composable functions and somehow run (render) these functions with my own implementation.
    a
    shikasd
    2 replies
    Copy to Clipboard
  • grandstaish

    grandstaish

    2 years ago
    Suppose I wanted to draw a loading spinner, but only if a load is taking longer than X milliseconds to complete (to avoid jarring/sudden UI changes for really quick async loads). Once the loading spinner is showing however, I want it to stick around for Y milliseconds before rendering the new data. Is this ux possible in Compose?
    grandstaish
    v
    +2
    7 replies
    Copy to Clipboard
  • SrSouza

    SrSouza

    2 years ago
    Hi folks, I'm writing a project that I download dynamically a font family and store at the device, there is anyway in Compose right now to generate a Font Family from this downloaded Files (Not resource ones) ?
    SrSouza
    l
    +1
    6 replies
    Copy to Clipboard
  • flosch

    flosch

    2 years ago
    Hey, I need a CoroutineScope that lives as long as the current composition. is this valid?
    @Composable
    internal fun composeCoroutineScope(
        coroutineContext: CoroutineContext = SupervisorJob() + Dispatchers.Main.immediate
    ): CoroutineScope {
        val scope = remember { CoroutineScope(coroutineContext) }
        onDispose { scope.cancel() }
        return scope
    }
    flosch
    Zach Klippenstein (he/him) [MOD]
    +2
    48 replies
    Copy to Clipboard
  • g

    Guy Bieber

    2 years ago
    I have a class I am using GSON to convert into the body of a REST request. When the class is marketed @Model for compose it adds “$record” and “frameId” into the json which breaks the request. Any good way to get around this?
    Expected (without @Model):
    {"public_key":"","user":{"email":"<mailto:me@me.com|me@me.com>","password":"fun"}}
    
    Actual (with @Model): 
    {"$record":{"user":{"$record":{"me":"<mailto:guy@me.com|guy@me.com>","password":"fun","frameId":1}},"frameId":1},"public_key":""}
    g
    Zach Klippenstein (he/him) [MOD]
    26 replies
    Copy to Clipboard