cutiko
cutiko

Reputation: 10527

AppBarLayout setExpanded speed is slow

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?

Upvotes: 5

Views: 815

Answers (1)

Marzi Heidari
Marzi Heidari

Reputation: 2730

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

Upvotes: 0

Related Questions