• Halil Ozercan

    Halil Ozercan

    1 year ago
    I gave it a shot this weekend to implement a markdown renderer in Jetpack Compose. Thanks to
    compose-richtext
    and abundance of Markdown parsers, I was able to have a working prototype in 2 evenings. Hopefully I can share the code once it is more organized and readable.

    https://youtu.be/Mrts0NdIcbE

    Halil Ozercan
    c
    +5
    7 replies
    Copy to Clipboard
  • Irving

    Irving

    1 year ago
    Hello, I read the source code of
    CircularProgressIndicator
    to learn how to write a custom view.But I'm confused about the
    Modifier.semantics
    . I thought it's
    SemanticsModifierCore
    may store the properties of CircularProgressIndicator,but i did't see anything about
    SemanticsModifierCore
    in
    CircularProgressIndicator
    .So what does
    Modifier.semantics
    do for us?😢
    Irving
    Adam Powell
    +1
    4 replies
    Copy to Clipboard
  • Alexander Karkossa

    Alexander Karkossa

    1 year ago
    Hey guys, i have a question. I tried to use an app-wide Scaffold with NavHost (from the navigation Snapshot Library) in its content. Each view should be able to edit the state of the bottomAppBar and the fab. (Show Fab, disable BottomDrawerLayout Gesture, hide BottomAppBar and so on) I tried the following, but i doesn't work. When i try to navigate to the LoginScreen, the changes in the bottomAppBarConfig and the fabConfig are triggering a complete redraw and the NavHost will also be recreated. Even before i try to navigate the hole tree recreates in a loop because of the config change for the first view How to do it correctly? I dont want to set the Scaffold per view because the app contains nearly 40 views...
    Alexander Karkossa
    Afzal Najam
    +1
    21 replies
    Copy to Clipboard
  • Robert Menke

    Robert Menke

    1 year ago
    Is
    PasswordTextField
    depcreated?
    Robert Menke
    Afzal Najam
    2 replies
    Copy to Clipboard
  • Pedro Gomez

    Pedro Gomez

    1 year ago
    Hi all! I'm writing an app and adding screenshot tests for my components and I'm facing some issues with the RoundedCornerShape. When using a shape for the component background the rendering result is not the changes a little bit and this makes the screenshot test tool to report there is an error in the rendering. The shape I'm using is this
    RoundedCornerShape(size = 16.dp)
    The error reported by the screenshot testing shows a bunch of small different pixels making the tests fail. Red dots in the screenshot are the errors reported by the testing tool. Do you know if the rendering can vary depending on the build or any other param?
    Pedro Gomez
    Andrey Kulikov
    +4
    53 replies
    Copy to Clipboard
  • Hitanshu Dhawan

    Hitanshu Dhawan

    1 year ago
    Hey guys, wanted your thoughts on implementing this UI with compose. • Text is 70% of width • Then image takes rest width and is slightly outside of the card. So, whats the best way to implement this? Stack/Box? Constraint Layout? etc.
    Hitanshu Dhawan
    v
    +4
    22 replies
    Copy to Clipboard
  • s

    Se7eN

    1 year ago
    So I have this code:
    val emojiState = remember { mutableStateOf(EmojiState.HIDDEN) }
    val definition = transitionDefinition<EmojiState> {
        state(EmojiState.HIDDEN) {
            this[emojiSize] = 0.dp
        }
    
        state(EmojiState.START) {
            this[emojiSize] = 20.dp
        }
    
        state(EmojiState.END) {
            this[emojiSize] = 50.dp
        }
    
        transition(fromState = EmojiState.START, toState = EmojiState.END) {
            interruptionHandling = InterruptionHandling.SNAP_TO_END
            emojiSize using tween(3000, easing = FastOutSlowInEasing)
        }
    }
    
    val transitionState = transition(
        definition = createEmojiTransition(),
        initState = emojiState.value,
        toState = if (emojiState.value == EmojiState.START) EmojiState.END else EmojiState.HIDDEN,
        onStateChangeFinished = {
            emojiState.value = it
        }
    )
    When I change
    emojiState
    to
    HIDDEN
    while the transition from
    START
    to
    END
    is going on, it looks like the transition isn't interrupted and still going on in the background. For example, I change the transition to
    HIDDEN
    1000 millis after starting the
    START
    to
    END
    transition, then after 2000 millis the
    onStateChangeFinished
    is run and it sets my state back to
    END
    . Is there some way I can interrupt the transition and prevent
    onStateChangeFinished
    to be called for interrupted transitions. Or maybe my logic is at fault here?
    s
    Afzal Najam
    +2
    9 replies
    Copy to Clipboard
  • m

    Mohammad Sianaki

    1 year ago
    Hey guys! How can I save and restore a
    LazyColumn
    or
    LazyRow
    scroll position across process death?
    m
    Brian Beale
    2 replies
    Copy to Clipboard
  • Sebastian Neagrau

    Sebastian Neagrau

    1 year ago
    Is it possible to add a Gradient Background to a Button? I tried adding a gradient to a Column and set the Column as the content of the button and set the button’s background color to Transparent, and I can see the gradient but for some reason I still have some paddings (even though they are set to 0).
    Sebastian Neagrau
    1 replies
    Copy to Clipboard
  • bruno.aybar

    bruno.aybar

    1 year ago
    When using
    OutlinedTextField
    , is there any way to always keep the label at the top , instead of having it inside when the text is empty / unfocused? I know the answer here usually is that that's the recommended material behavior, however, in this case I feel that such a small change is not worth creating a new
    TextFieldImpl
    implementation (but of course, I may be wrong).
    bruno.aybar
    Siyamed
    4 replies
    Copy to Clipboard