[BUGFIX] Controllato null su componenti grafiche come la toolbar
This commit is contained in:
@@ -54,8 +54,10 @@ open class WaterfallToolbar : androidx.cardview.widget.CardView {
|
||||
|
||||
var scrollViewScrollListener : ViewTreeObserver.OnScrollChangedListener = ViewTreeObserver.OnScrollChangedListener {
|
||||
// real position must always get updated
|
||||
realPosition.value = scrollView!!.scrollY
|
||||
mutualScrollListenerAction()
|
||||
if(scrollView != null) {
|
||||
realPosition.value = scrollView!!.scrollY
|
||||
mutualScrollListenerAction()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -69,8 +71,10 @@ open class WaterfallToolbar : androidx.cardview.widget.CardView {
|
||||
|
||||
var nestedScrollViewScrollListener : ViewTreeObserver.OnScrollChangedListener = ViewTreeObserver.OnScrollChangedListener {
|
||||
// real position must always get updated
|
||||
realPosition.value = nestedScrollView!!.scrollY
|
||||
mutualScrollListenerAction()
|
||||
if(nestedScrollView != null) {
|
||||
realPosition.value = nestedScrollView!!.scrollY
|
||||
mutualScrollListenerAction()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user