3

Is it possible to set the height of CollapsingToolbarLayout or AppBarLayout when the image is already loaded? Similar to Whatsapp behaviour.

Whatpsapp behaviour (Conversation Info Activity): The AppBarLayout height containing the CollapsingToolbarLayout is set on activity creation to a fixed value. But, when the group image is loaded, you can scroll to see the image on full height.

Edit: The target is fitting the CollapsingToolbarLayout with the image, getting the same proportion, and avoiding image crop.

Mario Velasco
  • 3,336
  • 3
  • 33
  • 50
  • This question http://stackoverflow.com/questions/30655939/android-programmatically-collapse-or-expand-collapsingtoolbarlayout might be of some help – Nishant Aug 04 '15 at 17:33
  • 1
    @Nishant It is not about expanding programmatically, but fitting the `CollapsingToolbarLayout` with the image, getting the same proportion, and avoiding image crop. – Mario Velasco Aug 05 '15 at 09:17
  • I think you can do the same thing if you know the image height and width. You can set the imageview to image height and programatically collapse the toolbar accordingly to some specific value. So a user can expand a toolbar if he wants. – Nishant Aug 05 '15 at 13:38

0 Answers0