• Cyril Find

    Cyril Find

    1 year ago
    Hi, I have a preview composable defined like this:
    @Preview
    @Composable
    fun PostHeader_Preview() {
        MyAppTheme {
            PostHeader(Post.PLACEHOLDER)
        }
    }
    that has a render problem that looks like this:
    java.lang.NoSuchMethodException: com.example.myapp.components.PostHeaderKt.PostHeader_Preview
    (full stacktrace in thread :thread-please: ) I have no idea how to fox that since the method actually exists, what can I do ?
    Cyril Find
    jim
    4 replies
    Copy to Clipboard
  • Ahmet Delibaş

    Ahmet Delibaş

    1 year ago
    I have a state
    var current by remember { mutableStateOf(0) }
    after any change on current value, AndroidView component does not recompose. Does anybody know the answer? How can I update the AndroidView() part?
    Ahmet Delibaş
    Adam Powell
    9 replies
    Copy to Clipboard
  • Vitor Prado

    Vitor Prado

    1 year ago
    which theme should be used in manifest? I need to create a light and a dark theme in xml too? or compose has a default for that?
    Vitor Prado
    Oussama Haff.
    +2
    8 replies
    Copy to Clipboard
  • Oussama Haff.

    Oussama Haff.

    1 year ago
    Hello 👋 What is the best way/practice to change the color of the ripple effect in default Material Buttons ? Knowing that what I have done in this example doesn’t work because internally in the
    Button
    Composable, the
    indication
    modifier is set to
    .indication(interactionState, AmbientIndication.current())
    or should I build my own Button to have control over the indication ?
    Oussama Haff.
    Bryan Herbst
    2 replies
    Copy to Clipboard
  • Shakil Karim

    Shakil Karim

    1 year ago
    Is there any Pull to refresh Composable?
    Shakil Karim
    1 replies
    Copy to Clipboard
  • h

    Hallefy

    1 year ago
    Hi guys, anyone are using Compose in production ? im ask because on my team we are thinking if we use in production or not.. if anyone is using, are having some troubles, or crashs ?
    h
    m
    +3
    6 replies
    Copy to Clipboard
  • l

    Lilly

    1 year ago
    Wrong title on android libraries documentation page detected. @Adam Powell @jim https://developer.android.com/jetpack/androidx/releases/compose-compiler
    l
    1 replies
    Copy to Clipboard
  • l

    Lilly

    1 year ago
    Sorry wasn't sure how to inform about this. Whats the right way?
    l
    Halil Ozercan
    +2
    5 replies
    Copy to Clipboard
  • Tony Kazanjian

    Tony Kazanjian

    1 year ago
    Hello folks. I'm wondering if anyone might have a more elegant solution to handling focus for multiple TextFields when triggering the ImeAction. I basically have a column of TextFields, and it seems like each field in the column scope must have its own
    FocusRequester
    . But perhaps
    FocusOrderModifier
    is what this is for...anyone have an example of how to use that? Here's what I have working so far:
    val firstNameFocus = remember { FocusRequester()}
        val lastNameFocus = remember { FocusRequester() }
        val emailFocus = remember { FocusRequester() }
        val passwordFocus = remember{ FocusRequester() }
    
        Column(Modifier.padding(16.dp)) {
            onActive {
                firstNameFocus.requestFocus()
            }
            CommonTextField(
                value = firstName,
                onTextChange = onFirstNameChange,
                modifier = Modifier.padding(8.dp).fillMaxWidth().focusRequester(firstNameFocus),
                label = { Text("First Name") },
                onImeAction = {lastNameFocus.requestFocus()}
            )
            CommonTextField(
                value = lastName,
                onTextChange = onLastNameChange,
                modifier = Modifier.padding(8.dp).fillMaxWidth().focusRequester(lastNameFocus),
                label = { Text("Last Name") },
                onImeAction = {emailFocus.requestFocus()}
            )
    
            CommonTextField(
                value = email,
                onTextChange = onEmailChange,
                modifier = Modifier.padding(8.dp).fillMaxWidth().focusRequester(emailFocus),
                label = { Text("Email") },
                onImeAction = {passwordFocus.requestFocus()}
            )
            PasswordTextField(
                value = password,
                onTextChange = onPasswordChange,
                modifier = Modifier.padding(8.dp).fillMaxWidth().focusRequester(passwordFocus),
                label = { Text("Password") },
                isPasswordVisible = remember { mutableStateOf(true) },
                onImeAction = {viewModel.registerUser(firstName, lastName, email, password)}
            )
    Tony Kazanjian
    manueldidonna
    +1
    4 replies
    Copy to Clipboard
  • Alexa_Gal

    Alexa_Gal

    1 year ago
    Hi guys What are some good practices for keeping code readable and simple when styling Views. i come from RN and getting each day in love with Android Compose. what im exactly looking for is a way to keep the modifiers in one place. in react native i would do something like
    const styles = StyleSheet.create({
    contaienr: {
    ....
    ...
    ...
    },
    box: {
    ...
    ...
    }
    })
    is there any good practice to do this with android compose?
    Alexa_Gal
    gildor
    11 replies
    Copy to Clipboard