-2

I want to use the chipped bottom navigation by https://github.com/ismaeldivita/chip-navigation-bar, But it is done in Kotlin. I want to us it in java. How can i use it? What code should I implement.

Krn S
  • 97
  • 2
  • 8
  • 1
    Kotlin and Java work very well together. Just treat it the same way you handle any java library, you don't have to do anything fancy. – Quinn Jan 15 '20 at 16:17
  • 1
    from the github you linked it seems you just need to add `implementation 'com.ismaeldivita.chipnavigation:chip-navigation-bar:1.2.0'` to your build.gradle – Quinn Jan 15 '20 at 16:18
  • Thanks. I will try it out. – Krn S Jan 15 '20 at 16:19

2 Answers2

3

Please check Calling Kotlin from Java official article. Actually each Kotlin construction can be unwrapped to Java (except inline function features and couple other).

Actually the coding is the same: add dependency into the project (both Kotlin and Java uses jar files), call methods, etc.

Manushin Igor
  • 3,398
  • 1
  • 26
  • 40
0

Add implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.3.70' to your dependencies as well