zawadz88/MaterialPopupMenu

Java version / documentation

florent37 opened this issue · 4 comments

I have a java legacy project ans i want to try this libraire without using kotlin, my team have tout stay on java. How to ?

Hi @florent37,
I'm not sure if this is possible. The entire syntax for creating these dialogs uses Kotlin features so you cannot really call it from Java (Lambdas with receivers).
What you might do is create a single Kotlin file where you would setup the dialog as you want to and call a method from that file in Java.

However, you would still need to use Kotlin in this project.

Could you share why you cannot use Kotlin? It's not that different from Java and offers a lot on top of Java. Setup is also easy and IDE support is also great.

It's a group decision to stay on java for now, out dev are juniors and the client do not want to swich to kotlin now

Thanks for sharing.
I understand, however the library itself is written in Kotlin so you have to use Kotlin in your project to use the library. There are no plans to migrate this to Java as the entire purpose of creating this lib for me was to make creating these dialogs easy using Kotlin's builder syntax TBH.

If you want to use it you would have to at least integrate Kotlin in your project and make some sort of a wrapper around the Builder. This would however mean using Kotlin for this one thing and I don't know if it's good enough for you.