I just update my app to Support Library version 24.0.0 and I'm getting some error about BottomSheet Params.
The code:
/**
* Default constructor for inflating BottomSheetBehaviors from layout.
*
* @param context The {@link Context}.
* @param attrs The {@link AttributeSet}.
*/
public BottomSheetBehaviorGoogleMapsLike(Context context, AttributeSet attrs) {
super(context, attrs);
TypedArray a = context.obtainStyledAttributes(attrs,
android.support.design.R.styleable.BottomSheetBehavior_Params);
setPeekHeight(a.getDimensionPixelSize(
android.support.design.R.styleable.BottomSheetBehavior_Params_behavior_peekHeight, 0));
setHideable(a.getBoolean(android.support.design.R.styleable.BottomSheetBehavior_Params_behavior_hideable, false));
a.recycle();
ViewConfiguration configuration = ViewConfiguration.get(context);
mMaximumVelocity = configuration.getScaledMaximumFlingVelocity();
}
Android Studio can't find:
android.support.design.R.styleable.BottomSheetBehavior_Params
android.support.design.R.styleable.BottomSheetBehavior_Params_behavior_peekHeight
android.support.design.R.styleable.BottomSheetBehavior_Params_behavior_hideable
Any idea where they moved it?
I got it! they change its name. Just change the word Param
for Layout
.
Like this: BottomSheetBehavior_Layout_behavior_peekHeight
More info in official docs