• vipulasri

    vipulasri

    1 year ago
    Whats the issue with warning like these:
    'Surface(Modifier = ..., Shape = ..., Color = ..., Color = ..., BorderStroke? = ..., Dp = ..., () -> Unit): Unit' is only available since Kotlin 1.4.30 and cannot be used in Kotlin 1.4
    P.S:
    kotlin_version = '1.4.30'
    compose_version = '1.0.0-alpha12'
    vipulasri
    a
    2 replies
    Copy to Clipboard
  • Yuri Drigin

    Yuri Drigin

    1 year ago
    Is there native way to hide softKeyboard inside Composable? Or need to use activity / fragment?
    Yuri Drigin
    Piotr Prus
    +1
    6 replies
    Copy to Clipboard
  • Piotr Prus

    Piotr Prus

    1 year ago
    I am experimenting with gesture detection in compose. Here is the code snipped:
    Surface(color = MaterialTheme.colors.background) {
                        Box(modifier = Modifier.size(100.dp).background(Color.Yellow)
                            .pointerInput(Unit) {
                                detectVerticalDragGestures(
                                    onDragCancel = { Log.d("AAAA", "onDragCancel") },
                                    onDragEnd = { Log.d("AAAA", "onDragEnd") },
                                    onVerticalDrag = { change, dragAmount -> Log.d("AAAA", "Drag change: $dragAmount") }
                                )
                            })
                    }
    It is a simple Box. The issue:
    onDragEnd
    and
    onDragCancel
    are never called. The
    onVerticalDrag
    works like a charm. Is there any mistake in my code or should I file a bug? Compose version : alpha12
    Piotr Prus
    Jan Bína
    2 replies
    Copy to Clipboard
  • József Szilvási

    József Szilvási

    1 year ago
    I know it has been asked before, but I haven’t seen any answers yet. Is there any way to strip the vertical padding off of the fonts? Something like a replacement for:
    android:includeFontPadding="false"
    android:lineSpacingExtra="0dp"
    József Szilvási
    d
    +1
    7 replies
    Copy to Clipboard
  • a

    Alex Bieliaiev

    1 year ago
    Hey guys. After
    7.0.0-alpha04
    to
    7.0.0-alpha06
    Android Gradle plugin migration I'm getting
    This version (1.0.0-alpha12) of the Compose Compiler requires Kotlin version 1.4.30 but you appear to be using Kotlin version 1.4.21 which is not known to be compatible.
    error. That is sort of expected, since I have a
    classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21")
    top-level dependency. Prior to the upgrade, however, I could explicitly specify
    kotlinCompilerVersion
    in the
    ComposeOptions
    section. As of now, this property seems to be deprecated. Do I have options other than complete project migration to Kotlin v1.4.30?
    a
    d
    4 replies
    Copy to Clipboard
  • Ahmet Delibaş

    Ahmet Delibaş

    1 year ago
    I want to use LazyRow to show LazyPagingItems in it. I do it, but when I refresh the list, list does not change. Is there anyone who know the solution ? I am sharing my code in the thread:
    Ahmet Delibaş
    1 replies
    Copy to Clipboard
  • Noé Casas

    Noé Casas

    1 year ago
    when using a WebView through AndroidView, sometimes the page is not shown. It appears to be random (the same page appears sometime, but sometimes it does not). When the problem happens, sometimes the following error shows up in logcat:
    2021-02-16 16:08:34.866 9683-9698/... E/System: Uncaught exception thrown by finalizer
    2021-02-16 16:08:34.909 9683-9698/... E/System: java.lang.IllegalStateException: Warning: Router objects should be explicitly closed when no longer required otherwise you may leak handles.
            at w4.finalize(chromium-TrichromeWebViewGoogle.aab-stable-432415233:4)
            at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:289)
            at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:276)
            at java.lang.Daemons$Daemon.run(Daemons.java:137)
            at java.lang.Thread.run(Thread.java:919)
         Caused by: java.lang.Exception: AutocloseableRouter allocated at:
            at w4.<init>(chromium-TrichromeWebViewGoogle.aab-stable-432415233:4)
            at vu.<init>(chromium-TrichromeWebViewGoogle.aab-stable-432415233:8)
            at org.chromium.content.browser.framehost.RenderFrameHostImpl.<init>(chromium-TrichromeWebViewGoogle.aab-stable-432415233:10)
            at org.chromium.content.browser.framehost.RenderFrameHostImpl.create(chromium-TrichromeWebViewGoogle.aab-stable-432415233:1)
            at J.N.MZAK3_Tx(Native Method)
            ...
    The way I instantiate webview is :
    @Composable
    fun WebViewView(html: String, ...) {
        AndroidView({ context ->
            val webView = WebView(context)
            // configure webview
            webview
        })
    }
    This have been happening in all compose versions I have tried. I have not found any similar problem in the bug tracker. Am I doing something wrong? Should I report a bug?
    Noé Casas
    1 replies
    Copy to Clipboard
  • k

    Kshitij Patil

    1 year ago
    How can bring the cross button above the box? The Text & Icon are being defined inside a box which is managing stroke & background color as well as shape. I tried putting cross button in parent box and with zIndex of this child box less than the icon’s but didn’t work. Do I need to write custom layout for this?
    k
    d
    +3
    9 replies
    Copy to Clipboard
  • Rick Regan

    Rick Regan

    1 year ago
    I'm trying to reconcile the single source of truth/state hoisting principle with the discrete
    Slider
    . As far as I can tell, it's not possible to hoist the discrete slider state and have it control the slider, meaning the local continuous slider state is the actual source of truth (see code in thread -- you of course can't reset the slider from the callback). You need to maintain continuous slider state so that the slider moves smoothly -- instead of jumping -- between discrete values. Obviously I could fix this by hoisting the continuous state, but then the slider is no longer conceptually discrete at that level; I'd have to move the "discreteness processing" up there. I don't think there's anything to be done about it; I guess I'm just saying that the discrete slider abstraction is "leaky".
    Rick Regan
    matvei
    8 replies
    Copy to Clipboard
  • Yofou

    Yofou

    1 year ago
    is it possible to either replace or turn off the ripple effect on a clickable?
    Yofou
    d
    +1
    3 replies
    Copy to Clipboard