Using custom behaviour to create multiple “anchor points”/positions for CollapsingToolbar

Based on what you want to achieve, you might want to try the SlidingUpPanelLayout (which can be found at Github). It has everything you seem to need:

  • Anchor: in order to achieve the anchors you decribe you’ll have to either set the umanoAnchorPoint attribute (which is percentage based), or – if you need more complex anchor calculation, e.g. depending on the ImageView height – use the setAnchorPoint method.
  • Persistant: unlike the BottomSheets mentioned above, this layout is actually meant to be persistent. The height of the panel when collapsed can be customized with the umanoPanelHeight attribute or with the setPanelHeight method.
  • Parallax: not exactly sure whether the implementation fits your needs and if you require it, but it does have basic parallax support.

You can find more info in the Readme on Github which is linked above.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)