3

サポートライブラリバージョン24.0.0にアプリケーションを更新するだけで、BottomSheet Paramsに関するいくつかのエラーが表示されます。
コード:
ASはBottomSheetBehavior_Params、_behavior_peekHeight、_behavior_hideableを見つけることができません

/** 
* 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のスタジオは見つけることができません。

  • 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

彼らはどこに移動したのですか?

+0

は、私はあなたのgithubのレポでこれを聞いて:)私はカスタムBottomSheetBehaviorを必要とする答え –

答えて

5

私はそれを手に入れました!彼らはその名前を変える。 Paramという単語をLayoutに変更してください。このよう
BottomSheetBehavior_Layout_behavior_peekHeight

詳細情報in official docs

+0

に感謝をしていました。タップ底面シートは画面の50%を開きます。しかし、BottomSheetは、ドラッグすると画面の100%をカバーする必要があります。手伝ってくれませんか。 –

関連する問題