• k

    Kshitij Patil

    1 year ago
    Can we maintain different variants of same Composable function for different flavors/build types?
    k
    c
    +2
    4 replies
    Copy to Clipboard
  • rsktash

    rsktash

    1 year ago
    Hi. Anybody tried to make a mpp app with dynamic features with compose? I have two dynamic feature modules. The main module will be available by default. The other two modules will be installed on demand. How can I access on demand module composable functions from main module?
    rsktash
    Arkadii Ivanov
    +1
    10 replies
    Copy to Clipboard
  • k

    Kort

    1 year ago
    Hi guys, I have a problem regarding RTL. I've googled, but I couln't find the similar issues. While dealing with Arabic, if I call
    Text("تزامن...")
    in
    AmbientLayoutDirection
    as
    Ltr
    , there will be an extra wrap line (see picture below). But it stays normal while as
    Rtl
    . Anyone have any solutions or suggestions? Thanks in advance!
    Providers(AmbientLayoutDirection provides LayoutDirection.Ltr) {  
     Text("LTR")  
     Text("تزامن...")  
     Text("مزيد من المعلومات.")  
    }  
    Providers(AmbientLayoutDirection provides LayoutDirection.Rtl) {  
     Text("RTL")  
     Text("تزامن...")  
     Text("مزيد من المعلومات.")  
    }
    k
    j
    +1
    5 replies
    Copy to Clipboard
  • a

    Alan Yin

    1 year ago
    Modifier in if not working, please see code below
    val modifier = Modifier
            .preferredWidth(292.dp)
            .preferredHeight(87.dp)
            .clickable(onClick = { selectedItem.value = item })
        if (item == selectedItem.value){
            Timber.i("on item selected ")
            modifier.background(brush = lightHighLightGradient)
        }
        Text(
            modifier = modifier,
            // .padding(start = 35.dp),
            text = stringResource(id = item),
            fontSize = 32.sp,
            textAlign = TextAlign.Center
        )
    a
    f
    2 replies
    Copy to Clipboard
  • p

    Philip Blandford

    1 year ago
    Is there a way to emulate the really useful autoSizeTextType*=*"uniform" behaviour, ie size the text according the size of the textview?
    p
    Zach Klippenstein (he/him) [MOD]
    +2
    4 replies
    Copy to Clipboard
  • Shakil Karim

    Shakil Karim

    1 year ago
    How can i apply colored shadow around any composable?
    Shakil Karim
    1 replies
    Copy to Clipboard
  • a

    alorma

    1 year ago
    Hi! Is there anny way to make
    TextField
    clickable, so we can display a
    DropdownMenu
    below it to select an item and set as text?
    a
    1 replies
    Copy to Clipboard
  • Daniel

    Daniel

    1 year ago
    Is it just me or is android studio really slow with intellisense when working on a project with compose 😢
    Daniel
    Colton Idle
    +3
    8 replies
    Copy to Clipboard
  • Zach Klippenstein (he/him) [MOD]

    Zach Klippenstein (he/him) [MOD]

    1 year ago
    Question for Compose devs working on Material – why did yall make the decision to represent different button styles as different composables with different names, vs something like just passing a
    ButtonStyle
    enum as a parameter? Given that Material has a fixed set of button styles, it seems like the parameterized version would be less code (1 fun vs 3), less duplication in documentation, and more discoverable.
    Zach Klippenstein (he/him) [MOD]
    jim
    +4
    15 replies
    Copy to Clipboard
  • Noé Casas

    Noé Casas

    1 year ago
    Is it Ok to use non-local state from a Composable function? An example would be a Composable that shows a Text with a String taken from a 
    MutableState
     stored as a member of an object retrieved through an Ambient, like this:
    data class ServiceX (
       val whateverString: MutableState<String>("meow")
    )
    
    
    @Composable
    fun Whatever() {
       val serviceX = AmbientServiceX.current
       Text(serviceX.whateverString)
    }
    Will the Composable function repaint when 
    whateverString
     changes? Are there any problems with this?
    Noé Casas
    jim
    +1
    10 replies
    Copy to Clipboard