Category "kotlin"

How to return multimap type with 3 tables (Android Room Databases)

I am trying to do a 3 way JOIN in my query for my Android Room Database. My tables relationships are: Table1 has a 1 to 1 relationship with Table2 Table2 has a

Combining Two Flows and add them to temporary list of StateFlow(Hot Flows)

I m getting data from two End points using flows and assigning those two list to temporary list in ViewModel. For this purpose, I'm using combine function and r

Room Database returns updated value only after app restart

i am inserting and deleting a row in room database using following methods of ViewModel class fun insert(rules: TableRules) = viewModelScope.launch { reposi

I am using viewpager2 inside a recyclerview but the images are not outputting. Why?

No matter what I do the pictures are not showing up. Even if I set the items to match parent, I still have the same problem, I've been dealing with it since the

How to use Kotlin generics to access same fields in sibling classes

data class Type1(val str: String) data class Type2(val str: String) interface Person data class Child1(val name: Type1) : Person data class Child2(val name: T

AES encryption of Image In Kotlin

I am trying to encrypt and decrypt the image by AES in Kotlin Key Generation Function- override suspend fun key_genration(callback: Enc) { val keygenerator

How to separate large numbers with spaces kotlin

I have a calculator app and I want it to show large numbers with spaces between them when users enter their input. Currently, they don't have spaces between the

4003: Data item to large sending data from wear os to app

I'm developing a wear os app that needs to send a list of "MyObject" to mobile, data class MyObject( val id: String, val name: String, val locations

How can I zoom in of an image without enlargining it?

I've been looking at a few methods of zooming in on images and I've found some similiar versions of this Zoom in GeeksForGeeks. Now my question is whether the z

Filter in calendarView

How can I filter the list to the selected date of the calendarView My error in in line *emit(it) private fun getFilmsDbFlow(resultDb: ResultDb): Flow<Results

Switch between activities but global function

I want to create a global function and I want to switch between activities with this function. Extensions.kt fun goActivity(context: Context, goClass: Class

Spring's @DateTimeFormat ignores wanted date format pattern

Can't get my head on how date formatting using @DateTimeFormat works. I send query with date params being: dateCreateFrom - 01.04.2022T00%3A00%3A00 dateCreateTo

kotlin quiz i can't color answer because don't run ContextCompat

Could you help me with the following code, I can't get it to paint the correct option green, or show the animation, of the CorrectResponse function. If I delete

Uneable to find TransformToGrayscaleOp class in android for transform to greyscale in android

I want to transform my image to grayscale but when i traid to use TransformToGrayscaleOp class i got this error in the ide: Unresolved reference: TransformToGra

Notifications are not shown when the app is closed, how can I fix it?

It successfully shows notifications when the app is open. It shows even when the app is in the background. When I close the app it doesn't show up anymore. I do

FFMpeg Add multiple Gifs/Watermarks to a video

I'm trying to add various Gifs/Watermarks to a video, but I'm having a problem getting it to work properly. We're assuming the video is 60 seconds long and I'm

How to detect state of ModalBottomSheetState while swiping bottom sheet in compose

simple question, How to detect state of ModalBottomSheetState while swiping bottom sheet in compose? I mean, I want to know how can I find out where state of M

holder.itemView.rowLayout.setOnClickListener

I have created the following adapter class for recyclerview but there is a compilation error while building in layout section "holder.itemView.rowLayout.setOnCl

How to update multiple types appwidgets from the fragment of ConfigActivity by pressing one button?

I've made 2 different types of appwidgets showing some calendar data. Each type has it's own layout, AppWidgetProvider class, AppWidgetProviderInfo object, but

Unable to Transfer spring-boot-starter-parent from maven repository

Below is my pom.xml. I am getting exceptions while fetching the spring-starter-parent from maven repo. what is it that I should specify in my relative path : Wh