0

What's appWant to achieve actionbar styling as it is currently in whatsapp and google play store application. An image is first overlay behind the action bar, and as the user scrolls up, the image gradually animate to the actionbar. Perfect example is found when a user views an app on google play store android application.

Do not want to use but want to implement the design within the application. Have read thread like http://cyrilmottier.com/2013/05/24/pushing-the-actionbar-to-the-next-level/ and this library but have not been able to figure out a way to implement this fully.

Belvi Nosakhare
  • 3,107
  • 5
  • 32
  • 65

1 Answers1

4

Here is how I'm achieving this in my apps:

  • Use a ListView from ObservableScrollView( https://github.com/ksoichiro/Android-ObservableScrollView).

  • In the Toolbar add a custom view with a public method inside that sets margins or paddings to what's inside, to the effect of collapsing or expanding the toolbar which is set to wrap_content.

  • Set a header to the ListView to match the height of the fully expanded toolbar.

  • Use the callbacks from ObservableScrollView to tell your custom view to collapse or expand.

Hope this helps.

memoizr
  • 2,081
  • 2
  • 18
  • 24