Skip to main content

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [kotlin]

Kotlin is a statically typed programming language that compiles to JVM bytecode, JavaScript, or native binaries.

Filter by
Sorted by
Tagged with
0 votes
0 answers
11 views

LazyColumn compared to RecyclerView in Jetpack Compose

I’m building a simple Food Manager screen using Jetpack Compose. The UI allows users to: Select a food category (Fruit, Vegetable, Snack, Drink). Select an item from that category. Add the ...
Ehtsham Hussain's user avatar
0 votes
0 answers
36 views

Spring 7 RouterFunctions and BeanRegistrarDsl med Kotlin

I am looking for a good way to structure my Kotlin code using Spring Boot 4 and Spring 7. The new features I am using are: Reflectionless dependency injection via ...
Alexander Petrov's user avatar
0 votes
0 answers
41 views

ReadWrite Lock compatible with coroutines

A while ago I wrote for my own needs a (non-reentrant) read-write lock for kotlin's coroutines. I got no reactions on the relevant github thread. I think it's a nice code, so I thought I'd share it ...
Al.G.'s user avatar
  • 109
3 votes
1 answer
49 views

Kotlin coroutines in Jetpack Compose: Dispatcher-usage

I have implemented a timer in Jetpack Compose. It counts down a given amount of seconds. The remaining seconds are displayed. Moreover the past and remaining seconds are displayed as a circular graph. ...
michael.zech's user avatar
  • 5,044
3 votes
1 answer
89 views

Jetpack Compose registration screen

I’ve created a Jetpack Compose function called RegisterName for a registration screen where users input a nickname and agree to an EULA before proceeding. The function works as intended, but I’m ...
dev4Life's user avatar
3 votes
0 answers
78 views

Bridging the gap between Spring's JdbcTemplate and Kotlin coroutines

I'm learning about Kotlin coroutines. I'm wondering if I can use them to increase the throughput of my spring-boot application which is currently very heavily dependent on jdbc connections, without ...
Jake's user avatar
  • 131
2 votes
2 answers
85 views

LFU cache in Kotlin

I've been working on the classic LFU (Least Frequently Used) cache running in O(1) time problem lately and, as a student, I kind of struggled with the algorithms I found online. I got most of the idea ...
NicolaM94's user avatar
2 votes
1 answer
120 views

Kotlin Compose authentication with Google and Facebook using a CircularProgressIndicator for UI loading

I had this problem: https://stackoverflow.com/questions/78528358/how-to-prevent-circularprogressindicator-from-freezing-during-authentication-in Now after fixing it, I want to make sure that this is ...
Cipri's user avatar
  • 121
5 votes
1 answer
96 views

Calculating a weight from a tag using kotlin

I'm not really happy with the below solution. Background is that I am receiving results from a graphql query that includes tags, and I want to translate these tags into weights and save those results ...
isic5's user avatar
  • 95
4 votes
1 answer
202 views

Logic to check if app was launched for the first time using DataStore

I have written a dummy code to check if an app was launched for the time using DataStore. It is working however i want to know if this can be optimised and i also observed a small glitch initially ...
dev4Life's user avatar
5 votes
1 answer
126 views

Compose Grid With Lists

I have created a Grid out of using the new concept of List in Kotlin. I'm open to any feed back to how this code could be improved. It functions as expected and I'm happy with the results. ...
xxxVxxxlinux's user avatar
2 votes
1 answer
100 views

Handling View State & Side Effects with Lifecycle Awareness in Jetpack Compose MVI Composable

I'm working on a stateful Jetpack Compose composable that follows the MVI architecture. I'm using collectAsStateWithLifecycle() to observe the view state from a view model, but I'm unsure about the ...
Android Developer's user avatar
4 votes
1 answer
138 views

Turn List<Either<A, B>> into Either<A, List<B>>

I'm trying to integrate Arrow-kt's Either into an application that needs to parse and validate filter input. This input is a comma separated list of criteria. ...
t3chb0t's user avatar
  • 44.7k
5 votes
2 answers
279 views

Kotlin: scoped functions with try/catch support

I'm working with Kotlin for some time. Compared to Java it's more concise. Still it has some legacy inherited from Java. For example the try-catch-construct. Though it has been upgraded from a ...
LuCio's user avatar
  • 183
3 votes
1 answer
78 views

Recursive item recipe creation

I was trying to write code that would get as input a recipe consisting of item materials and would create all possible recipes that could be used to create craftable of the recipe. The Recipe is ...
Barracuda's user avatar
  • 131

15 30 50 per page
1
2 3 4 5
17
Morty Proxy This is a proxified and sanitized view of the page, visit original site.