• Sami Eljabali

    Sami Eljabali

    2 years ago
    Does anyone know why Compose needed its own custom Kotlin compiler?
    Sami Eljabali
    n
    +4
    7 replies
    Copy to Clipboard
  • a

    audriusk

    2 years ago
    Is there
    suspend fun support on IR backend
    issue ticket on KT tracker which I can follow? On google issuetracker https://issuetracker.google.com/issues/134993205 this one doesn't have any crossref
    a
    1 replies
    Copy to Clipboard
  • f

    fengdai

    2 years ago
    Does anyone know the difference between
    ViewGroup.setContent
    (in Wrapper) and
    ViewGroup.setViewContent
    (in Compose)?
    f
    Luca Nicoletti
    +1
    8 replies
    Copy to Clipboard
  • n

    nglauber

    2 years ago
    Just starting with compose, so sorry for the dumb question but… I’m adding a
    TextField
    but it has no background or the bottom line like existing in
    EditText
    . Do you guys know how can I set it? This is what I’m doing.
    TextField(
                value = currentPerson.name,
                onValueChange = { currentPerson.name = it },
                editorStyle = EditorStyle(
                    textStyle = TextStyle(
                        fontSize = (16.sp)
                    )
                )
            )
    Also, I’m trying to add two
    TextFields
    inside a
    Row
    and no luck so far… I’m getting this error:
    java.lang.IllegalArgumentException: minWidth 2147483647.ipx should be finite
    n
    Luca Nicoletti
    +2
    10 replies
    Copy to Clipboard
  • andrew

    andrew

    2 years ago
    I have an ambient value, that updates everywhere else in the UI, but inside here.
    andrew
    r
    +1
    12 replies
    Copy to Clipboard
  • andrew

    andrew

    2 years ago
    How can I shim ambient to act like state?
    andrew
    kioba
    +2
    11 replies
    Copy to Clipboard
  • m

    matt tighe

    2 years ago
    I’ve run into this issue while trying to import Compose into two separate existing projects. It’s not immediately apparent what is causing the issue when I look at file it’s complaining about. Does anyone have suggestions on how to debug this?
    m
    Luca Nicoletti
    +1
    6 replies
    Copy to Clipboard
  • m

    Mihai Hrincescu

    2 years ago
    Is there a way to align a
    DrawVector
    inside a container or i need to wrap the
    DrawVector
    with another container that gets its dimensions from the
    vectorAsset
    ? I feel like I'm missing something.
    m
    j
    3 replies
    Copy to Clipboard
  • r

    R Brian Amesbury

    2 years ago
    In my single activity app, I am trying to replace the UI that I currently inflate with
    Databinding
    with
    compose
    in my fragments. I am doing this:
    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? =
        container.apply {
          this?.let {
            it.setContent {
              Text("Compose")
            }
          }
        }
    It is failing with this exception:
    java.lang.IllegalStateException: Views added to a FragmentContainerView must be associated with a Fragment. View androidx.ui.core.AndroidComposeView{99eebb1 VFED..... ......I. 0,0-0,0} is not associated with a Fragment.
    The
    container
    that is passed in to
    onCreateView
    is a
    FragmentContainerView
    which I am guessing is the view that is inflated in the activity to host the
    NavGraph
    . How can compose my UI in my fragment, and set it as the content?
    r
    m
    3 replies
    Copy to Clipboard
  • Michal Bacik

    Michal Bacik

    2 years ago
    Why are
    @Compose
    methods starting with uppercase, when Kotlin has lower-case rules for functions? Kotlin lists exception for factory function creating class of same name, but this is not case of Compose. And Compose uses upper-case for its functions, and it's even not tagget in IDE with warning, while ordinary functions show correct warning.https://kotlinlang.org/docs/reference/coding-conventions.html#naming-rules
    Michal Bacik
    Fudge
    +13
    37 replies
    Copy to Clipboard