File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
lib/java/com/google/android/material/appbar Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -841,6 +841,21 @@ public boolean setLiftable(boolean liftable) {
841841 return setLiftableState (liftable );
842842 }
843843
844+ /**
845+ * Sets whether the {@link AppBarLayout} lifted state corresponding to {@link
846+ * #setLiftable(boolean)} and {@link #setLifted(boolean)} will be overridden manually.
847+ *
848+ * <p>If true, this means that the {@link AppBarLayout} will not manage its own lifted state and
849+ * it should instead be manually updated via {@link #setLifted(boolean)}. If false, the {@link
850+ * AppBarLayout} will manage its lifted state based on the scrolling sibling view.
851+ *
852+ * <p>Note that calling {@link #setLiftable(boolean)} will result in this liftable override being
853+ * enabled and set to true by default.
854+ */
855+ public void setLiftableOverrideEnabled (boolean enabled ) {
856+ this .liftableOverride = enabled ;
857+ }
858+
844859 // Internal helper method that updates liftable state without enabling the override.
845860 private boolean setLiftableState (boolean liftable ) {
846861 if (this .liftable != liftable ) {
You can’t perform that action at this time.
0 commit comments