• adjpd

    adjpd

    1 year ago
    To get Compose preview to work I need this dependency:
    implementation "androidx.compose.ui:ui-tooling:$compose_version"
    But then that means that library will increase the size of my production build. Is there a way around this?
    adjpd
    Javier
    +2
    7 replies
    Copy to Clipboard
  • s

    Slackbot

    1 year ago
    This message was deleted.
    s
    d
    +2
    26 replies
    Copy to Clipboard
  • d

    darkmoon_uk

    1 year ago
    Layout Inspector bug? I have an App that starts out using UIView XML layouts, and later navigates to Compose defined screens. Layout inspector works on startup, but as soon as we navigate to the Compose screen, it shows the screen but the Component Tree is blank and no elements are clickable i.e. the inspector breaks. Using
    1.0.1
    and
    ui-tooling
    etc. same on Device / Emulator 🤷. Not even sure if the UIView/Compose mix is significant... inspector just plain doesn't work on Compose. Documentation says it should?
    d
    Nick
    +1
    12 replies
    Copy to Clipboard
  • j

    Jan Skrasek

    1 year ago
    Why is not NavController a local? I'd love to use ~ findNavController() instead of creating callbacks for every action/or passing the NavController down.
    j
    f
    +2
    6 replies
    Copy to Clipboard
  • f

    Felix Schütz

    1 year ago
    Is it possible to properly use the SplashScreen compat library (https://developer.android.com/about/versions/12/splash-screen-migration#splashscreen_compat_library) with Jetpack Compose? According to the examples, I would use it like so:
    class MainActivity : ComponentActivity() {
        override fun onCreate(savedInstanceState: Bundle?) {
            super.onCreate(savedInstanceState)
    
            installSplashScreen()
    
            setContent {
                // ...
            }
        }
    }
    However,
    setContent
    replaces the root view when it finishes loading, so any custom splash screen animation will not play. Is there a better alternative?
    f
    Colton Idle
    2 replies
    Copy to Clipboard
  • z

    zokipirlo

    1 year ago
    Hi! Is there an option on
    TextField
    to prevent showing soft input similar to
    showSoftInputOnFocus
    on
    EditText
    ?
    z
    f
    3 replies
    Copy to Clipboard
  • Alex

    Alex

    1 year ago
    Is there a way to use
    collectAsState()
    (or an equivalent) inside of a
    LazyListScope
    (outside of a
    @Composable
    )? The usecase is conditionally emitting either A or B items, depending on the content of a
    StateFlow
    Alex
    f
    +1
    10 replies
    Copy to Clipboard
  • f

    Felix Schütz

    1 year ago
    And another question: I implemented the shown navigation transition by having a upper nav host and a lower nav host. The lower nav host is wrapped inside a scaffold, which is a composable in the upper nav host. I know that it is always recommended to not use nested nav hosts and instead conditionally show the top and bottom bar in the scaffold. However, I want this specific transition, which scales in the second screen above the top and bottom bar of the first screen. As far as I'm concerned, this is not possible by using a single nav host inside a scaffold. Am I wrong / is there an alternative?
    f
    pepos
    4 replies
    Copy to Clipboard
  • iamthevoid

    iamthevoid

    1 year ago
    Does anybody develop cross platform native apps, KMM for example? Is there compose
    remember
    analog in SwiftUI?
    iamthevoid
    a
    3 replies
    Copy to Clipboard
  • Marcin Środa

    Marcin Środa

    1 year ago
    Hi folks, is there a substitute for
    ViewTreeObserver.OnPreDrawListener
    in Compose? Looking for a way to delay startup due to data initialization. Was looking on https://developer.android.com/about/versions/12/features/splash-screen but can’t connect it with compose.
    Marcin Środa
    n
    +1
    8 replies
    Copy to Clipboard