Category "kotlin"

Sending Data between Fragments using Shared Viewmodel and SharedFlow

I'm very new to Kotlin Flows. As the title suggests I basically have 2 Fragments that Shares a ViewModel. I want to send data between them using SharedFlow as a

Property with return value in Java/Kotlin?

This is a pretty basic question, but I haven't been able to find any answer on SO yet. I'm just curious, is there a corresponding way in Java or Kotlin to write

Why is Spring @Transactional unreliable with AspectJ?

TLDR: this project reproduces the issue: https://github.com/moreginger/aspectj-no-tx Edit: Above now reproduced without jooq i.e. using plain JDBC. Edit: Spring

Why I need to explicitly add the fragment and activity dependencies in android?

I don't understand, while learning through a codelab in android they want me to add the following dependencies to the android build.gradle implementation "andro

drawing a speech bubble using canvas in jetcompose

i want to draw a speech bubble using canvas in jetcompose but i dont know how to draw an arrow at bottom end of the Rectangle this is my code: @Composable fun D

LazyColumn with ConstraintLayout in android jetpack compose

I'm going to put a label on the top for each column and a LazyСolumn on the bottom. As follows. However, when I filled it out, the screen other than I ex

How to test async function in Mockk Kotlin

I want to test this function. suspend fun fetchTwoDocs() = coroutineScope { val deferredOne = async { fetchDoc(1) } val deferred

When to use let/run/apply/with/also when an object is null?

I want to run a block of code depending if the variable is null or not, but I still don't know when to use let,run...etc. I want something like this: myVar?.xxx

Quarkus: connect to cloudsql db (gcp) with native image

I've set up a prod configuration for my datasource to connect to a GCP MySQL instance, basically following this tutorial: https://quarkus.io/guides/deploying-to

Android Studio memory profiler have some serious memory issues

I am trying to fix some memory leaks in my apps but I am always fighting with memory profiler instability itself instead of being able to focus on my task. Inte

java.lang.IllegalStateException: No request transformation found: XYZ in ktor

Hey I am working in ktor. I am getting weird issue and I am trying to find the issue, but unable to get the proper reference. androidMain AndroidHttpClient.kt p

Kotlin sort one List with key and Enum with key and order

I receive data from Request information as list data (List) below code. That data has a "key" parameter by which I want to sort it. data class ApplianceSetting(

Can't show/hide menu items on Kotlin - Android Studio

my application has a menu of 3 options, and what I want is that according to a condition that I define, it shows only 2 options, or it shows 3. I have tried all

How to open file with custom extension on android 11 via action open document

How i can open file with my extension settings. Framework see this file,but i can't open it. when i set mime_type / all ok,but it allow to open all file types,b

Convert string with separator to data class instance

I have a string separated by ";" like this: var dataString: String = "Juan;25;Argentina" And I want to convert it to this sample data class: data class Person

Why I am not able to use mobile authentication with firebase in jetpack compose?

I am try to learning android jetpack compose, I have simple app, and I want to use mobile authentication with firebase for my project. I am using MVVM in the pr

Google SSO login is not working in my Android app for the last one week, Showing the account selection dialog continuously

From the last one week the Google SSO login is not working in my Android app and it keeps loading the account selection dialog even after selecting the account.

.class file too large

I have a kotlin file with a function that returns a list of strings with 10,000 elements, but when compiling it generates an error, saying that the .class file

Corda - Checking equality of AbstractParty, Party and AnonymousParty

In Corda we have the following type hierarchy for providing ledger identities: abstract class AbstractParty(val owningKey: PublicKey): Destination { /** An

navigateUp() and popBackStack() not working. Instead, they reload the current fragment

I am trying to navigate up the backstack. On calling the method view?.findNavController().navigateUp() and logging the destination using view?.findNavController