【发布时间】:2016-08-19 03:38:55
【问题描述】:
BottomSheetBehavior 在
中正常工作compile 'com.android.support:design:24.1.1'
但是当我将它更新到 24.2.0 时,它不起作用。这是一个错误吗? 这是我的代码:
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
>
<LinearLayout
android:id="@+id/llScroll"
android:layout_width="match_parent"
android:layout_height="200dp"
android:orientation="vertical"
android:background="@color/blue_1"
app:layout_behavior="android.support.design.widget.BottomSheetBehavior">
</LinearLayout>
</android.support.design.widget.CoordinatorLayout>
【问题讨论】:
-
'not work' 信息不足。 如何它不起作用?
-
我也有同样的问题。 “不起作用”意味着它只是显示为一个简单的布局,没有任何预期的行为,mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);不再工作。它只是不起作用。
-
这里有同样的问题 .. 现在即使 peekheight 没有设置它也会显示出来。谢谢谷歌!
-
更新到24.2.0后不工作
-
我只想说明问题出在 app:layout_behavior="android.support.design.widget.BottomSheetBehavior" 类型的 BottomSheet 而不是 BottomSheet 片段。
标签: android android-support-library bottom-sheet