• n

    Nicolas Acart

    1 year ago
    Hi there, how do you detect soft keyboard visibility changes? On stack overflow some solutions are using the global layout listener, but I really don't like this solution because this method is called many times. The only "good" solution I have found is to use WindowInsets in the onCreate method of my main activity:
    ViewCompat.setOnApplyWindowInsetsListener(window.decorView) { _, insets ->
        val isKeyboardVisible = insets.isVisible(WindowInsetsCompat.Type.ime())
        onSoftKeyboardVisibilityChange(isKeyboardVisible)// own method which notifies me of changes
        insets
    }
    This way worked in the emulator (Pixel 3a API 30) but not on my phone (Galaxy S8 API 28) On top of that after launching my app, I noticed that my statusBarColor and navigationBarColor from themes.xml no longer work (status and nav bars are white or dark according to the theme instead of my own colors set in themes.xml) I tried to change
    window.navigationBarColor
    and
    window.statusBarColor
    in the setContent without success I don't understand what's going on. Is it possible to have an explanation ?
    n
    i
    +1
    6 replies
    Copy to Clipboard
  • YASAN

    YASAN

    1 year ago
    Is there a way to automatically rotate Icons when the device is using a RTL language? I can turn on
    AutoMirror
    for my own vector drawables but cant find a way to do that for Material Icons
    YASAN
    1 replies
    Copy to Clipboard
  • Ryan Simon

    Ryan Simon

    1 year ago
    Hey all, I’m currently working with accompanist and the insets libraries, and it’s mostly doing what I want. Though I ran into a particular use case where passing padding from the insets-ui
    Scaffold
    to a child
    Composable
    isn’t very obvious More info in the thread…
    Ryan Simon
    i
    32 replies
    Copy to Clipboard
  • g

    gitai

    1 year ago
    Hi, I started reading the ‘Foundation’ articles and I’m having some difficulties in understanding how things build up from source code to runtime execution. Specifically, consider the following quotes: “In Compose's declarative approach, widgets are relatively stateless and do not expose setter or getter functions. In fact, ***widgets are not exposed as objects.***” “Composition: a description of the UI built by Jetpack Compose when it executes composables.” “remember (composable) stores objects in the Composition, and forgets the object when the composable that called remember is removed from the Composition.” What exactly does the Compose compiler produce when parsing a @Composable annotated function ? Does it generate a class for each function that gets instantiated at runtime as node in the UI object tree ?
    g
    Filip Wiesner
    3 replies
    Copy to Clipboard
  • Alexander Sitnikov

    Alexander Sitnikov

    1 year ago
    Does this mean that the next version of Compose cannot be used with AGP 4.2?
    Alexander Sitnikov
    1 replies
    Copy to Clipboard
  • adauguet

    adauguet

    1 year ago
    Is there an empty element in compose?
    adauguet
    Alex Gabor
    +3
    10 replies
    Copy to Clipboard
  • divid3d

    divid3d

    1 year ago
    Hi. Is there any possibility to disable dragging in
    ModalBottomSheetLayout
    ? I'm looking for solution that would allow to hide bottom sheet only programmatically.
    divid3d
    d
    9 replies
    Copy to Clipboard
  • Erlan Amanatov

    Erlan Amanatov

    1 year ago
    I need to fill the remaining space in
    Column
    with an image but with a limit of its height. My code looks like
    Column{
    item1()
    item2()
    Image(Modifier.weight(1f))
    item3()
    ..
    )
    For small screens it works fine, but on bigger screens it takes too much space. So I need to limit the height of the image somehow.
    Erlan Amanatov
    n
    +2
    7 replies
    Copy to Clipboard
  • r

    Richard Z

    1 year ago
    Does anybody know if there’s a way to force a compositing layer for a composable without a hack like setting alpha to 99%?
    r
    Arkadii Ivanov
    +1
    6 replies
    Copy to Clipboard
  • Vinícius Santos

    Vinícius Santos

    1 year ago
    There is any way i can scroll to a specific item inside a LazyColumn ?
    Vinícius Santos
    Alex Gabor
    2 replies
    Copy to Clipboard