Skip to content
Advertisement

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

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

Advertisement