• Siyamed

    Siyamed

    2 years ago
    it is strange. afaik nothing in text changed to cause a rendering problem. sounds like draw related.not sure where
    Siyamed
    s
    +2
    17 replies
    Copy to Clipboard
  • v

    Val Salamakha

    2 years ago
    It seems that ripple() in modifier does not work (dev-08)
    v
    Adam Powell
    3 replies
    Copy to Clipboard
  • Klaas Kabini

    Klaas Kabini

    2 years ago
    Why do we still have to put extra parenthesis in front of composable keyword?
    typealias ComposableFunction = @Composable() () -> Unit
    instead of just doing this. But the AS does not allow this
    typealias ComposableFunction = @Composable () -> Unit
    Klaas Kabini
    a
    +2
    5 replies
    Copy to Clipboard
  • Klaas Kabini

    Klaas Kabini

    2 years ago
    Is it okay to think of the FrameManager to composable functions the same as FragmentManager to Fragment?
    Klaas Kabini
    Adam Powell
    2 replies
    Copy to Clipboard
  • k

    Kazemihabib1996

    2 years ago
    Any Idea why Icon is not vertically centered when I set fontSize to Text
    Surface(color = Color.Green) {
                Row(modifier = Modifier.fillMaxWidth().gravity(RowAlign.Center)) {
                    Text("More", style = TextStyle(fontSize = 30.sp, color = Color(0xFFC7C7C7)))
                    Icon(Icons.Filled.ArrowForward, tint = Color(0xFFC7C7C7))
                }
            }
    k
    m
    +1
    6 replies
    Copy to Clipboard
  • m

    molikto

    2 years ago
    val s = state { 1 }
    Text(s.value.toString())
    remember {
        s.value = s.value + 1
    }
    it seems on dev08, updating a mutable state in the same frame will not triger recomposition? Is this a bug? (expected text should be "2")
    m
    Andrey Kulikov
    3 replies
    Copy to Clipboard
  • k

    Kazemihabib1996

    2 years ago
    Can some one please explain why without adding the weight to TextField it occupies the whole space and icon doesn't render?
    Box(modifier = modifier.drawShadow(shape = RoundedCornerShape(5.dp), elevation = 1.dp), padding = 16.dp) {
            Row(Modifier.fillMaxWidth()) {
                TextField(value = model.text, onValueChange = { data -> model.text = data }, modifier = Modifier.weight(1f))
                Icon(Icons.Filled.Search, tint = Color.Red)
            }
        }
    k
    1 replies
    Copy to Clipboard
  • Akram

    Akram

    2 years ago
    Hello, I'm just starting with Jetpack compose and I'm having a problem with image scaling
    @Composable
    fun TravelPlaceCard(place:Place ,  modifier: Modifier = Modifier.None){
        Column (modifier = modifier.preferredWidthIn(maxWidth = 150.dp)){
            val imageModifier = Modifier.preferredHeight(180.dp).preferredWidth(150.dp).clip(RoundedCornerShape(4.dp))
            Image(asset = place.image , modifier = imageModifier , scaleFit = ScaleFit.FillWidth)
            Spacer(modifier = Modifier.preferredHeight(3.dp))
            val emphasisLevels = EmphasisAmbient.current
            ProvideEmphasis(emphasis = emphasisLevels.high) {
                Text(text = place.name , style = MaterialTheme.typography.subtitle1 , modifier = Modifier.fillMaxWidth(), maxLines = 2 )
            }
            ProvideEmphasis(emphasis = emphasisLevels.medium) {
                Text(text = place.location , style = MaterialTheme.typography.subtitle2 )
            }
            
        }
    }
    here is the result
    Akram
    Siyamed
    +2
    14 replies
    Copy to Clipboard
  • s

    Sheroz Nazhmudinov

    2 years ago
    hey i’ve been playing with compose recently, and have a short question. I want to render the vector asset inside the row. Currently i’m doing smth like this:
    Row(modifier = Modifier.fillMaxHeight() + Modifier.fillMaxWidth()) {
        if (stateChecked.value) {
            VectorPainter(asset = vectorResource(id = R.drawable.ic_checkbox_on))
        } else {
            VectorPainter(asset = vectorResource(id = R.drawable.ic_checkbox_off))
        }
    }
    However, it doesn’t show anything on the screen. Is that approach correct, at all?
    s
    kartoffelsup
    +2
    7 replies
    Copy to Clipboard
  • k

    Kismet

    2 years ago
    Can't seem to get past this error.
    java.lang.NoSuchMethodError: No static method setContent(Landroid/app/Activity;Lkotlin/jvm/functions/Function0;)Landroidx/compose/Composition; in class Landroidx/ui/core/WrapperKt; or its super classes
    I'd like to use
    0.1.0-dev08
    to play with
    AdapterList
    .
    k
    Ash
    +1
    5 replies
    Copy to Clipboard