• Paul Woitaschek

    Paul Woitaschek

    1 year ago
    I'm trying to find a way to reverse an avd animation. I have a avd for Play-> Pause and Pause->Play. When I just use the
    animatedVectorResource
    with the
    atEnd
    , it will just reverse the animation but I want to use a different vector for the reverse way. Is there any way to do that with compose?
    Paul Woitaschek
    1 replies
    Copy to Clipboard
  • r

    Rafiul Islam

    1 year ago
    I have two structures. I am confused about which one is preferable or both have problems there are better solutions than this. 1. I have all the state property and onChangeProperty method in ViewModel. I get the response from the network and update them in ViewModel. Then just use those states in UI. 2. All properties and methods in the UI. I just get a response from the network then update a single state, observe it and update all properties in the UI. See code in the thread
    r
    2 replies
    Copy to Clipboard
  • Dmitry Strekha

    Dmitry Strekha

    1 year ago
    I'm building a design system and have a question about colors:how to handle text colors? In classic android we have
    android:textColor
    ,
    android:textColorPrimary
    and
    android:textColorSecondary
    (plus some inverted versions) attributes. In compose (and in Material in general) there are no special colors for text, but just
    colorOnX
    . I see a few solutions here:- create a custom theme which extends Material theme and add
    colorText
    and
    colorTextSecondary
    (plus versions for
    onPrimary
    ).- override
    LocalContentColor
    with primary text color and apply alpha to it when need a secondary version. Not sure if this may work, because the result color may not be the same as desired color. What is the best solution?
    Dmitry Strekha
    Zoltan Demant
    +1
    9 replies
    Copy to Clipboard
  • eneim

    eneim

    1 year ago
    Question: given a LazyColumn with many items, how can I collect the indexes of items that user has scrolled through without using a Composable (e.g. storing them to Database)? I tried the side effects:
    // Use the index as key to be notified when it is changed.
    LaunchedEffect(key1 = listState.firstVisibleItemIndex) {
        // Store the listState.firstVisibleItemIndex to DB
    }
    But it slows down the scroll performance significantly.
    eneim
    Albert Chang
    5 replies
    Copy to Clipboard
  • Anastasia Rozovskaya

    Anastasia Rozovskaya

    1 year ago
    Hello. I have an OutlinedTextField, Text and Button. In onValueChange I save input value and on Button click call a viewModel method which may result in error, which I show in Text. How can I hide the error Text when onValueChange is triggered once more?
    Anastasia Rozovskaya
    rajesh
    4 replies
    Copy to Clipboard
  • Alex

    Alex

    1 year ago
    Is there a (material) date picker dialog / (material) date picker in compose yet?
    Alex
    Tgo1014
    +1
    3 replies
    Copy to Clipboard
  • Tiago Nunes

    Tiago Nunes

    1 year ago
    Hey everyone, How can I have a clickable Surface with elevation and shape? When I do
    Modifier.clip(shape).clickable {}
    , the Surface loses its elevation
    Tiago Nunes
    Filip Wiesner
    7 replies
    Copy to Clipboard
  • Florian

    Florian

    1 year ago
    Can I wrap this into a second line if the screen width is too small?
    Florian
    Ravi
    4 replies
    Copy to Clipboard
  • n

    nitrog42

    1 year ago
    I have a bug with rememberSaveable and maybe livedata/savedStateHandle
    val value by it.savedStateHandle.getLiveData<String>("Value").observeAsState()
    val rememberedValue by rememberSaveable(value) {
        mutableStateOf(value ?: "Empty")
    }
    When "Value" is set, rememberedValue remains Empty. If I use
    remember(value)
    or even
    remember
    , it works and display the content of value I have to add that it works when setting the value from the same Composable, but not when using Navigation with two screens (first screen display value, second screen set value and pop) :
    navController.previousBackStackEntry?.savedStateHandle?.set("Value", "value")
    navController.popBackStack()
    is it a known bug ?
    n
    2 replies
    Copy to Clipboard
  • t

    tad

    1 year ago
    We might be the first banking app written in 100% Compose. Thanks to this channel for being an invaluable resource. https://play.google.com/store/apps/details?id=com.mercury.bank
    t
    s
    +1
    4 replies
    Copy to Clipboard