public BottomSheet4StateBehaviour(Context context, IAttributeSet attrs) : base(context, attrs) { using (TypedArray a = context.ObtainStyledAttributes(attrs, Resource.Styleable.BottomSheetBehavior_Layout)) { PeekHeight = a.GetDimensionPixelSize(Resource.Styleable.BottomSheetBehavior_Layout_behavior_peekHeight, 0); Hideable = a.GetBoolean(Resource.Styleable.BottomSheetBehavior_Layout_behavior_hideable, false); } /** * Getting the anchorPoint... */ AnchorPoint = DefaultAnchorPoint > PeekHeight ? DefaultAnchorPoint : 0; Collapsible = true; using (TypedArray a1 = context.ObtainStyledAttributes(attrs, Resource.Styleable.CustomBottomSheetBehavior)) { AnchorPoint = (int)a1.GetDimension(Resource.Styleable.CustomBottomSheetBehavior_anchorPoint, DefaultAnchorPoint); // _state = a1.GetInt(Resource.Styleable.CustomBottomSheetBehavior_defaultState, StateCollapsed); _state = a1.GetInt(Resource.Styleable.CustomBottomSheetBehavior_defaultState, StateAnchorPoint); } ViewConfiguration configuration = ViewConfiguration.Get(context); _minimumVelocity = configuration.ScaledMinimumFlingVelocity; _dragCallback = new ViewDragHelperCallback(this); }
public BottomSheet4StateBehaviour() { _dragCallback = new ViewDragHelperCallback(this); }