首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >找不到BottomSheetBehavior_Params,_behavior_peekHeight和_behavior_hideable

找不到BottomSheetBehavior_Params,_behavior_peekHeight和_behavior_hideable
EN

Stack Overflow用户
提问于 2016-06-21 19:40:30
回答 1查看 993关注 0票数 4

我只是更新了我的应用程序,以支持24.0.0版的库,并且我得到了一些关于BottomSheet Params的错误。

守则:

代码语言:javascript
复制
/**
 * 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

知道他们把它移到哪里了吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-06-21 20:09:51

这样啊,原来是这么回事!他们改名了。只需将单词Param改为Layout即可。

像这样:BottomSheetBehavior_Layout_behavior_peekHeight

更多信息in official docs

票数 6
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37953212

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档