mirror of
https://github.com/kuba2k2/NavLib.git
synced 2024-11-22 09:06:21 -06:00
Make FAB on click listener nullable
This commit is contained in:
parent
84d6447887
commit
e4ad01dc87
4
.gitignore
vendored
4
.gitignore
vendored
@ -11,4 +11,6 @@
|
||||
/build
|
||||
/captures
|
||||
.externalNativeBuild
|
||||
/_hakerskie
|
||||
/_hakerskie
|
||||
*.apk
|
||||
app/release/
|
@ -104,6 +104,14 @@ class NavBottomBar : BottomAppBar {
|
||||
fabExtendedView?.text = value
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the FAB's on click listener
|
||||
*/
|
||||
fun setFabOnClickListener(onClickListener: OnClickListener?) {
|
||||
fabView?.setOnClickListener(onClickListener)
|
||||
fabExtendedView?.setOnClickListener(onClickListener)
|
||||
}
|
||||
|
||||
private fun create(attrs: AttributeSet?, defStyle: Int) {
|
||||
setOnTouchListener { _, event ->
|
||||
if (bottomSheet?.enable != true || bottomSheet?.enableDragToOpen != true)
|
||||
|
@ -153,9 +153,8 @@ class NavView : FrameLayout {
|
||||
/**
|
||||
* Set the FAB's on click listener
|
||||
*/
|
||||
fun setFabOnClickListener(onClickListener: OnClickListener) {
|
||||
floatingActionButton.setOnClickListener(onClickListener)
|
||||
extendedFloatingActionButton.setOnClickListener(onClickListener)
|
||||
fun setFabOnClickListener(onClickListener: OnClickListener?) {
|
||||
bottomBar.setFabOnClickListener(onClickListener)
|
||||
}
|
||||
|
||||
internal var systemBarsUtil: SystemBarsUtil? = null
|
||||
|
Loading…
Reference in New Issue
Block a user