1
我想将底部工作表用作底部的弹出窗口。我需要删除协调器布局中的拖动功能。我可以拨打防止用户拖动BottomSheet支持库23.2
bottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
如果我想动画视图。我只是试图阻止用户拖动他们的手指拉起视图。
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/coordinator_layout"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:keepScreenOn="true" >
<LinearLayout
android:id="@+id/bottom_sheet"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:behavior_hideable="true"
app:layout_behavior="android.support.design.widget.BottomSheetBehavior"
android:orientation="vertical" >
<!-- view and stuff... -->
</LinearLayout>
</android.support.design.widget.CoordinatorLayout >
任何人有任何想法?
我已尝试过,但我遇到了问题,没有将屏幕视图关闭。 – DDukesterman
查看我上面有关如何实现它的更新回答。 – Francesc
我试试这个,让你知道!感谢这篇文章。 – DDukesterman