https://kotlinlang.org
Join Slack
I'm updating a SnapshotStateList from a CoroutineScope and also reading same list from Composable `...
s

Shakil Karim

over 2 years ago
I'm updating a SnapshotStateList from a CoroutineScope and also reading same list from Composable
val list = SnapshotStateList<VoiceItem>()
appScope.launch {
voicesList.add(VoiceItem(id))
}
But i'm getting a lot of ANR in production app like this ``````
s
z
c
  • 3
  • 7
  • 756
why `onFocusChanged` is not getting triggered every time user clicks on `InputField` ? how to make `...
h

Hasan Nagizade

almost 3 years ago
why
onFocusChanged
is not getting triggered every time user clicks on
InputField
? how to make
InputField
get focus every time user clicks on it?
h
z
+2
  • 4
  • 5
  • 756
Hi. Did anybody successfully implemented http cache-control on Ktor client? If yes, then I'll much a...
r

rsetkus

about 5 years ago
Hi. Did anybody successfully implemented http cache-control on Ktor client? If yes, then I'll much appreciate if you could point me to any source (articles, documentation, code samples etc.) of implementation.
r
m
  • 2
  • 11
  • 756
Is KSP still not compatible with Kotlin 2.0.0?
s

Suresh Maidaragi

over 1 year ago
Is KSP still not compatible with Kotlin 2.0.0?
s
r
e
  • 3
  • 10
  • 751
Hello ! Does anyone know how to programmatically restart app in single Activity architecture?
j

Jason

over 4 years ago
Hello ! Does anyone know how to programmatically restart app in single Activity architecture?
stackoverflow 3
j
g
n
  • 3
  • 5
  • 751
Hello, I'm seeing this error: ```io.ktor.serialization.JsonConvertException: Illegal input Caused by...
c

CLOVIS

over 2 years ago
Hello, I'm seeing this error:
io.ktor.serialization.JsonConvertException: Illegal input
Caused by: io.ktor.serialization.JsonConvertException: Illegal input
Caused by: kotlinx.serialization.json.internal.JsonDecodingException: Polymorphic serializer was not found for missing class discriminator ('null')
JSON input: {"failures":[{"type":"INCOMPATIBLE_FIELD","field":"","message":"impossible d'importer class opensavvy.formulaide.core.Field$Label à partir de class opensavvy.formulaide.core.Field$Group"}]}
Pretty-printing the JSON on the last line:
{
	"failures": [
		{
			"type": "INCOMPATIBLE_FIELD",
			"field": "",
			"message": "impossible d'importer class opensavvy.formulaide.core.Field$Label à partir de class opensavvy.formulaide.core.Field$Group"
		}
	]
}
It looks normal to me, and there definitely is a type discriminator? What's going on?
c
i
  • 2
  • 1
  • 750
I’ d like load drawable shape and have same error. `java.lang.IllegalArgumentException: Only Vec...
a

Android75

over 3 years ago
I’ d like load drawable shape and have same error.
java.lang.IllegalArgumentException: Only VectorDrawables and rasterized asset types are supported ex. PNG, JPG
this is shape.
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="<http://schemas.android.com/apk/res/android>" android:shape="oval">
    <solid android:color="#F44336"/>

</shape>
and code.
Image(
    imageVector =   ImageVector.vectorResource(
        id = R.drawable.ball
    ),
    contentDescription = null
)
a
a
c
  • 3
  • 7
  • 748
Hi how to change Checkbox rounded corner for Box, after check the code i think it is impossible. Rad...
m

Marcin Mazurek

over 4 years ago
Hi how to change Checkbox rounded corner for Box, after check the code i think it is impossible. Radius should be changeable from the outside
@Composable
private fun CheckboxImpl(
    enabled: Boolean,
    value: ToggleableState,
    modifier: Modifier,
    colors: CheckboxColors
) {
....
        drawBox(
            boxColor = boxColor,
            borderColor = borderColor,
            radius = RadiusSize.toPx(),
            strokeWidth = strokeWidthPx
        )
➕ 1
m
k
+2
  • 4
  • 10
  • 747
Hello! Anyone else has issues with xcode 16? Updated xcode and my project running on kotlin 1.9.24, ...
e

Edgars Malahovskis

about 1 year ago
Hello! Anyone else has issues with xcode 16? Updated xcode and my project running on kotlin 1.9.24, fails to build with : Exception in thread “main” java.lang.Error: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk/usr/include/copyfile.h3510: fatal error: ‘sys/cdefs.h’ file not found Any advice would be appreciated.
e
f
+2
  • 4
  • 14
  • 746
Hi all I am using Clean Architecture (Data, Domain, Presentation layers) to build app but I am confu...
l

Lokik Soni

over 3 years ago
Hi all I am using Clean Architecture (Data, Domain, Presentation layers) to build app but I am confused in which layer should put BroadcastReceiver. I am using BroadcastReceiver for listening Battery changes like whether the charger is connected or not to show In UI etc. According to this https://stackoverflow.com/questions/59576331/android-specific-code-in-clean-architecture I should put BroadcastReceiver in Data layer because it is giving me data. But I think it is android component it should be in presentation layer. Please answer this . Thanks
l
v
+2
  • 4
  • 18
  • 745
Previous747576Next

kotlinlang

A modern programming language that makes developers happier.

Powered by