File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
lib/java/com/google/android/material/appbar Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -857,17 +857,21 @@ private boolean setLiftableState(boolean liftable) {
857857 * @return true if the lifted state changed
858858 */
859859 public boolean setLifted (boolean lifted ) {
860- return setLiftedState (lifted );
860+ return setLiftedState (lifted , /* force= */ true );
861861 }
862862
863863 /** Returns whether the {@link AppBarLayout} is in a lifted state or not. */
864864 public boolean isLifted () {
865865 return lifted ;
866866 }
867867
868- // Internal helper method that updates lifted state.
869868 boolean setLiftedState (boolean lifted ) {
870- if (this .lifted != lifted ) {
869+ return setLiftedState (lifted , /* force= */ !liftableOverride );
870+ }
871+
872+ // Internal helper method that updates lifted state.
873+ boolean setLiftedState (boolean lifted , boolean force ) {
874+ if (force && this .lifted != lifted ) {
871875 this .lifted = lifted ;
872876 refreshDrawableState ();
873877 if (liftOnScroll && getBackground () instanceof MaterialShapeDrawable ) {
You can’t perform that action at this time.
0 commit comments