Skip to content

Commit

Permalink
MeowBottomNavigation.kt callListener
Browse files Browse the repository at this point in the history
  • Loading branch information
Hamidreza Etebarian committed Jun 19, 2019
1 parent 8b7837b commit f683962
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle
Expand Up @@ -15,7 +15,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.novoda:bintray-release:0.9'
classpath 'com.novoda:bintray-release:0.9.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
Expand Up @@ -25,6 +25,7 @@ class MeowBottomNavigation : FrameLayout {

var models = ArrayList<Model>()
var cells = ArrayList<MeowBottomNavigationCell>()
var callListenerWhenIsSelected = false

private var selectedId = -1

Expand Down Expand Up @@ -136,6 +137,9 @@ class MeowBottomNavigation : FrameLayout {
if (!cell.isEnabledCell && !isAnimating) {
show(model.id)
mOnClickedListener(model)
} else {
if (callListenerWhenIsSelected)
mOnClickedListener(model)
}
}
disableCell()
Expand Down

0 comments on commit f683962

Please sign in to comment.