https://kotlinlang.org
Join Slack
is there no `BackHandler` composable in compose multiplatform?
r

Rafs

about 2 years ago
is there no
BackHandler
composable in compose multiplatform?
r
j
z
  • 3
  • 6
  • 553
I am using `animateScrollTo()` to vertically scroll a fixed height `Text`. The animation occurs as e...
r

Rick Regan

over 2 years ago
I am using
animateScrollTo()
to vertically scroll a fixed height
Text
. The animation occurs as expected when the text length increases past the bottom of the
Text
but not when it decreases. I’d like to know how to get it to animate for the latter. (Please see code and screen recording in thread.)
r
e
d
  • 3
  • 16
  • 553
How do people deal with BigDecimal for currency in multiplatform? Is there a library to workaround t...
c

Chrys

almost 2 years ago
How do people deal with BigDecimal for currency in multiplatform? Is there a library to workaround the lack of support? https://discuss.kotlinlang.org/t/multiplatform-bigdecimal-implementation/5631
c
l
+4
  • 6
  • 9
  • 552
Is there a precompiled converter from vector drawable (or svg) to `ImageVector`’s builder code? I do...
v

Vsevolod Ganin

almost 5 years ago
Is there a precompiled converter from vector drawable (or svg) to `ImageVector`’s builder code? I doubt that material icons from library are done by hand. I have a svg and I want to avoid converting to vector drawable altogether since it will convert to
ImageVector
in runtime anyway
👍 2
v
m
+3
  • 5
  • 10
  • 552
Hello, I am trying to implement rememberSwipeableState() function in Compose, but not able to resolv...
p

Prasanth

over 2 years ago
Hello, I am trying to implement rememberSwipeableState() function in Compose, but not able to resolve
rememberSwipeableState()
val swipeableState = rememberSwipeableState(0)
On the Material and Material2 Compose there was a SwipeableState and a swipeable option on the Modifier. But in Material3 this doesn't exist, at all. How can i achieve this in Material3 ?
implementation 'androidx.compose.material3:material3'
p
a
  • 2
  • 1
  • 551
Is it possible to use Log4j Kotlin ( <https://logging.apache.org/log4j/kotlin/index.html> ) with Kto...
n

napperley

almost 7 years ago
Is it possible to use Log4j Kotlin ( https://logging.apache.org/log4j/kotlin/index.html ) with Ktor?
n
r
  • 2
  • 16
  • 551
Hey everyone, I have a question regarding how `GraphicsLayer` works in Jetpack Compose. I thought I ...
s

Sergey Y.

over 1 year ago
Hey everyone, I have a question regarding how
GraphicsLayer
works in Jetpack Compose. I thought I understood it before, but a recent discovery has made me question my understanding 🤔. Details in the thread 🧵
s
z
n
  • 3
  • 39
  • 550
I have some issues with the newly added shared transition element. `java.lang.IllegalArgumentExcepti...
o

Osanosa

over 1 year ago
I have some issues with the newly added shared transition element.
java.lang.IllegalArgumentException: layouts are not part of the same hierarchy
I have a card with an image and a Dialog with the same image. I want to make a smooth transition between them. Basic structure is:
SharedTransitionLayout{
Column{
...
AsyncImage(modifier = Modifier.sharedElementWithCallerManagedVisibility(
    sharedContentState =rememberSharedContentState(key = order.id!!),
    visible = true
))
if (boolean){
Dialog{
AsyncImage(modifier = Modifier.sharedElementWithCallerManagedVisibility(
    sharedContentState =rememberSharedContentState(key = order.id!!),
    visible = true
))
}
}
}
}
I also tried wrapping it inside animatedVisibility instead of if block and still same issue, how do I make it work?
o
t
+2
  • 4
  • 7
  • 550
I am using an Android Webview and I would like to set a "loading" message while the url is loading. ...
d

Daniele B

over 1 year ago
I am using an Android Webview and I would like to set a "loading" message while the url is loading. I was expecting that the "update" function would get called also after the page gets loaded, but it doesn't happen. Can anyone suggest how to update a Composable-compliant boolean when the page has loaded?
@Composable
fun MyComposable(url: String) {

    val webClient = CustomWebViewClient()
    val showLoadingMessage by remember { mutableStateOf(true) }

    Box(modifier = Modifier.fillMaxSize()) {

	    AndroidView(
	       factory = { context -> WebView(context).apply { webViewClient = webClient } },
           update = { webView -> if (!webClient.loaded) { webView.loadUrl(url) } else { showLoadingMessage = false } }
        )

        if (showLoadingMessage) {
            Text(text = "I am loading the page...")
        }

    }

}

class CustomWebViewClient: WebViewClient(){
    var loaded = false
    override fun onPageFinished(view: WebView?, url: String?) {
        loaded = true
    }
}
d
s
  • 2
  • 6
  • 550
Hello, I'm trying to do mocking in a multiplatform project (jvm, native, common), what is a framewor...
a

Alexandre Brown

over 3 years ago
Hello, I'm trying to do mocking in a multiplatform project (jvm, native, common), what is a framework that works well for you guys and if possible works well with kotest. I'm trying out
org.kodein.mock.mockmp
, tests and mocking works but building the project fails
The provided plugin com.google.devtools.ksp.KotlinSymbolProcessingComponentRegistrar is not compatible with this version of compiler
so I'm not sure if it's the best framework for now. Any thoughts?
a
b
+3
  • 5
  • 16
  • 550
Previous113114115Next

kotlinlang

A modern programming language that makes developers happier.

Powered by