I have a problem with my Kotlin Android App. So far I haven’t written such a large project in Kotlin, so I totally don’t know what’s wrong. When I try to start my application, I recive a wall of red lines. I found some solutions (for Java) and tried to implement them to my code, but it didn’t work. and
Tag: kotlin
Kotlin Any type to Java Object type
I have an odd situation I’ve never run into before. At my company we have a mix of projects with most in Java but a growing number in Kotlin. So we have this existing application written in Java, and we are adding a library written in Kotlin. The Kotlin code has a function argument that takes in a lambda expression.
Can’t make a bottomsheet go all the way up screen
I’m an internship in a company and I’m not receiving all the support I’d like to. I have this FAQ screen with a button that should bring up a bottomsheet so the customer can contact us. The problem is, it goes up like 75% and the sheet then has to be dragged up to the ‘send’ button actually show. I
field initialization with `val myVal: (long: Long) -> Unit)` what does it means?
I’m new to using Kotlin, so far seems amazing, however I don’t quite understand what’s going on here: So, here’s what I do understand: I am creating a class that contains a method which receives a MyObjectClass When I call onClick(someObject) I am actually indicating to call clickListener(someObject.longField) I should use this callback method like this: Unit is a Kotlin
How to exit the app when bottomsheetdialog showing
I have bottomsheet that check if the internet connected or not! if no connected the bottomsheet showed, if not the bottomsheet dismiss. I used bottomSheetDialog.dismiss(); function to prevent the user from pressing the screen to hide the bottomsheet. Now what I want is that the user if press back when bottomsheet showed exit the app. not exit bottocheet first and
MapStruct + Kotlin/JVM(v1.5.10) Error: The return type Flow is an abstract class or interface
My project uses MapStruct successfully when it does not include Flux or Flow streams. When I try to generate a mapper with a Flow or Flux, I receive an error: “error: The return type Flow is an abstract class or interface.” Since Flow and Flux are interfaces, is there a way to still use MapStruct or do I have to
Android Kotlin – Why does a Seekbar minimum value over 100 not work?
Hello everybody When i add a min value to my Seekbar which is over 100 it always shows an min value of 100. So for example my min value is 120 but it shows 120. I found out that i can use every value until 100 but no bigger value for my “min”. Does anyone know the reason? My code:
after update firebase I got on real device error in android error message > zzdk: keyset not found, will generate a new one
it works fine on emulater but in real device I got this error in the log caty zzdk: keyset not found, will generate a new one java.io.FileNotFoundException: can’t read keyset; the pref value GenericIdpKeyset does not exist and I have latest service-json file and I put the SHA-1 & SHA-256 Answer So it appears as @ikhlas ahmed confirmed the solution
Predicate alternative in Kotlin
I try to create lambda in Kotlin. I has following Java interface: And in Java I can return new Specification from method like: And with Java 8 I can cut it to labda like: How to do it in Kotlin with lamba? I already tried many options, but they do not compile. help please. Update: Last option in Kotlin: It
how to display categories in data class with retrofit2 – Kotlin
i am trying to display data from API using retrofit2 in koltin but the API shows that there is categoryId before the data i am calling as showing below: i tried to call only (eventName, eventPhoto, eventLink) in my data class as showing below: API interface: Adapter: after i run the application, it shows that the data are null do