4

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?

MiguelHincapieC
  • 5,445
  • 7
  • 41
  • 72

1 Answers1

6

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

MiguelHincapieC
  • 5,445
  • 7
  • 41
  • 72
  • I need custom BottomSheetBehavior. On tap bottom sheet should open 50% of the screen. But BottomSheet should cover 100% of the screen when dragged. Can you please help me. – Ankit Aman Apr 22 '17 at 06:51