File tree 1 file changed +8
-2
lines changed
lib/java/com/google/android/material/bottomappbar
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 43
43
import com .google .android .material .shape .MaterialShapeDrawable ;
44
44
import com .google .android .material .shape .ShapePathModel ;
45
45
import android .support .design .widget .CoordinatorLayout ;
46
+ import android .support .design .widget .CoordinatorLayout .AttachedBehavior ;
46
47
import android .support .v4 .graphics .drawable .DrawableCompat ;
47
48
import android .support .v4 .view .AbsSavedState ;
48
49
import android .support .v4 .view .ViewCompat ;
80
81
* @attr ref com.google.android.material.bottomappbar.R.styleable#BottomAppBar_fabCradleVerticalOffset
81
82
*
82
83
*/
83
- @ CoordinatorLayout .DefaultBehavior (BottomAppBar .Behavior .class )
84
- public class BottomAppBar extends Toolbar {
84
+ public class BottomAppBar extends Toolbar implements AttachedBehavior {
85
85
private static final long ANIMATION_DURATION = 300 ;
86
86
87
87
public static final int FAB_ALIGNMENT_MODE_CENTER = 0 ;
@@ -627,6 +627,12 @@ public void setSubtitle(CharSequence subtitle) {
627
627
// Don't do anything. BottomAppBar can't have a subtitle.
628
628
}
629
629
630
+ @ NonNull
631
+ @ Override
632
+ public CoordinatorLayout .Behavior <BottomAppBar > getBehavior () {
633
+ return new Behavior ();
634
+ }
635
+
630
636
/**
631
637
* Behavior designed for use with {@link BottomAppBar} instances. Its main function is to link a
632
638
* dependent {@link FloatingActionButton} so that it can be shown docked in the cradle.
You can’t perform that action at this time.
0 commit comments