5

Im using a CollapsingToolbarLayout inside the AppBarLayout, the user can expand it or collapse it by using the setExpanded(boolean) method from AppBarLayout.

The problem is the animation is slow and not smooth.

I have being searching and it seems there is a problem with the support design library (please read this question). But I cant downgrade my support design library cause Im using BottomSheetBehaviorand I get this errors:

Error:(88) No resource identifier found for attribute 'behavior_hideable' in package...
Error:(88) No resource identifier found for attribute 'behavior_peekHeight' in package...

Any suggestion to increase the setExpand speed?

Community
  • 1
  • 1
cutiko
  • 9,887
  • 3
  • 45
  • 59

1 Answers1

0

use appBarLayout.setExpanded(true,true); instead of setExpanded(boolean)and the expantion will be animated

Marzi Heidari
  • 2,660
  • 4
  • 25
  • 57