Open KeulTomi opened 4 years ago
bottomBar.setOnItemSelectedListener(new OnItemSelectedListener() { @Override public void onItemSelect(int i) { Log.d("",i + ""); } });
bottomBar.setOnItemSelectedListener(new OnItemSelectedListener() { @override public void onItemSelect(int i) { Log.d("",i + ""); } });
it couldn't work
smoothBottomBar.setOnItemSelectedListener(i -> {
// i = the currently selected index
});
smoothBottomBar.setOnItemReselectedListener(i -> {
// i = the currently reselected index
});
The above code can be used for setting the item selected and item reselected listeners. But to have this kind of simple expression you need to enable Java1.8 compile option.
go to your app.gradle file and add the following snippet inside the android object
android {
...
compileOptions {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
}
Hy, It is a great library, but i can not code in kotlin. So my question is: Is there perhaps a java version of this library? If so, than could you please link it for me? Thank you for your answer!