Category "kotlin"

Button Long Press Listener in Android jetpack compose

I am having an Android Composable UI with a Button. How can I track button long press events? I got it working for the Text long press, but for Button, It is no

Kotlin for a new application for stock management?

I am searching a new language/framework for a v2 of a old app we have in my company, for stock management, and I was wondering if Kotlin could do the work. Basi

Uploading files Kotlin Spring Boot

So, I am trying to make and upload file(s) functionality, from some blog posts and stackoverflow questions I got this solution: @PostMapping("/file/upload") fun

Uploading files Kotlin Spring Boot

So, I am trying to make and upload file(s) functionality, from some blog posts and stackoverflow questions I got this solution: @PostMapping("/file/upload") fun

Is there any way to stretch layout when device has cutout (notch)?

I'm making my project able to handle notch/cutout because users can see big black rectangle area when in landscape mode. Since my app's layout will be safe afte

Kotlin @Serializable annotation not working in IntelliJ

I'm trying to use the @Serializable annotation in Kotlin. I can build the project with Gradle, but it's showing up red in IntelliJ and when I hover on the @Seri

Logcat does not show an error message when an exception is thrown in the coroutine (Xiaomi)

It shows only I/Process: Sending signal. PID: xxxxx SIG: 9 I have tried to enable debug mode System.setProperty(DEBUG_PROPERTY_NAME, DEBUG_PROPERTY_VALUE_ON) b

MutableStateFlow force update / notify collector

MutableStateFlow doesn't notify collectors if the updated value equals the old value (source). I've found a workaround for this, but it doesn't scale well for c

Updated intellij messed up Kotlin with 'Check your module classpath for missing or conflicting dependencies'

Lot's of frustration here. I decided to follow the pop-up prompting an intellij upgrade so it'd stop nagging me. And now I get a compiler error on certain parts

Ktor - kotlinx.coroutines.channels.ClosedReceiveChannelException: Channel was closed

I am receiving back this kotlinx.coroutines.channels.ClosedReceiveChannelException upon about 50% of my api calls to a post url through Ktor HttpClient. Our cod

How is Dart "sound null-safety" different from Kotlin null safety?

This Dart official video states that Dart's so-called "sound null safety" is better than Kotlin's null safety design, because it can optimise the code based on

Kotlin I can't add element to the end of the arrayOf

the problem is, that I can't understand differences between: ARRAY OF, LIST OF and ARRAY LIST OF I know, that arrays are mutable in nature, but list not. When I

RecyclerView Fragment calling itself onClick of the ListView with changed data using bundle in Android Kotlin using MVVM to separate data in VM class

So its just I want to ask question is in RecyclerView Fragment as, I want to buid a RecyclerView Fragment in MVVM by seprating the data in ViewModel separate Cl

Spring boot + Kotlin + MongoDb: Cannot resolve reference to bean 'mongoTemplate' while setting bean property

I am trying to make a simple application using kotlin and spring boot which connects to mongodb and makes some operations there, however I am facing this issues

Plugin 'kotlin-parcelize' not found

Google is recommending users to migrate from kotlin-android-extensions to kotlin-parcelize. However, Gradle sync fails with the following error: Plugin [id: 'ko

Mocking internal function call in Kotlin

I am a complete beginner in terms of Kotlin and I am finding some issues while trying to test out a Ktor based application. I have a file in my endpoints packag

Android app doesn't work the same with mobile data as with wifi

I have an App which repeatedly gets some data from an API. That works really good when I have a wifi connection. But with mobile data my request either times ou

Sending an ID or an object as String to the next screen in Jetpack Compose?

I have 30 users displayed in a LazyColumn. On user click, I navigate forward to UserDetailsScreen. My question, is it better to pass the ID of the user and crea

How to load image in Kotlin Compose desktop?

How to load images from the hard disk when using Kotlin compose on the desktop?

add third party library to kotlin multiplatform mobile shared module

Am writing a KMM mobile app that will be calling an AppSync API, my intention was to implement all the API calls in the shared module so that I don't have to wr