Using cheesesquare - android support library example is it possible to make the Header ImageView
scroll-able?
OK, I did some research in the bug reports, and this is a known bug within the Design Support Library
.
Check out the bug report here
I have taken a look at the implementation that backs
CoordinatorLayout
/AppBarLayout
/theBehavior
classes etc. TheAppBarLayout
uses the behaviour defined inAppBarLayout.Behavior
by default. This extendsViewOffsetBehavior
which in turn extendsBehavior
. The baseBehavior
class has the methodsonInterceptTouchEvent()
andonTouchEvent()
, both of which return false (meaning "we don't want to handle touch events"). These methods are not overridden by eitherViewOffsetBehavior
orAppBarLayout.Behavior
, meaning that the touch is left unhandled - which is why it does nothing.A possible workaround for third-party developers would be to extend
AppBarLayout.Behavior
and implementonInterceptTouchEvent()
andonTouchEvent()
and manipulate the app bar accordingly.
These show the current and intended behavior. These are also from the bug report.