bottom-sheet

BottomSheet custom behavior - above BottomBar

此生再无相见时 提交于 2019-12-06 11:49:35
问题 I want to display BottomSheet above my BottomBar . So I have to write custom BottomSheet behavior that will put my BottomSheet above my BottomBar - the BottomBar has shy behavior (hidding during scrolling). There is what I tried to implement: public class BottomSheetBehavior<T extends View> extends android.support.design.widget.BottomSheetBehavior<T> { public BottomSheetBehavior(Context context, AttributeSet attrs) { super(context, attrs); } @Override public boolean layoutDependsOn

Bottom Sheet Android- Scrolling issue

怎甘沉沦 提交于 2019-12-06 03:29:12
问题 I need the bottom sheet to stop at two positions. I have the following code for Bottom Sheet. <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/main_content" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true"> <RelativeLayout android:layout_width="match_parent"

how to get bottomSheet to open from the top?

寵の児 提交于 2019-12-05 22:12:15
问题 I'm opening a NestedScrollView in my app and so far it opens from the bottom of the screen. How do I make it open from the top? I tried removing the following line: app:layout_behavior="android.support.design.widget.BottomSheetBehavior" But the app crashes with the following error: The view is not associated with BottomSheetBehavior Is there a way to open the bottom sheet from the top of the screen? Here is my activity: ViewPager mainViewPager; private BottomSheetBehavior mBottomSheetBehavior

Persistent BottomSheet Below Fragment Contents?

落花浮王杯 提交于 2019-12-05 17:33:52
Using a Persistent BottomSheet , within a CoordinatorLayout , how can one prevent the BottomSheet from covering other user interface elements when the BottomSheet is in its COLLAPSED aka peeked state? I've successfully added a BottomSheet to my Navigation Drawer & Fragment based application; however, as mentioned above, the BottomSheet covers user interface elements within my fragment container when it's either COLLAPSED or EXPANDED Covering part of the fragment is ok when the BottomSheet is expanded since, if needed, users can collapse the BottomSheet to its peek state. However, I've

Scrolling is not working with CoordinatorLayout + parallax image + BottomSheetLayout

此生再无相见时 提交于 2019-12-05 09:32:59
问题 Introduction I have an activity, which implements a common pattern with parallax header image and scrolling content using CoordinatorLayout , AppBarLayout and CollapsingToolbarLayout . My xml layout looks like this: <android.support.design.widget.CoordinatorLayout android:fitsSystemWindows="true" android:layout_height="match_parent" android:layout_width="match_parent"> <android.support.design.widget.AppBarLayout android:fitsSystemWindows="true" android:id="@+id/appbar" android:layout_height=

Dim Screen and Block Interaction with BottomSheets

北城余情 提交于 2019-12-05 05:43:14
BottomSheetBehavior has been introduced in Android Design Support Library 23.2, however it does not dim the rest of the screen and does not block interaction with the rest of the UI. Is there anyway this can be achieved? azizbekian public class BottomSheetDimmedFragment extends BottomSheetDialogFragment { public static final String TAG = BottomSheetDimmedFragment.class.getSimpleName(); @NonNull @Override public Dialog onCreateDialog(final Bundle savedInstanceState) { final BottomSheetDialog dialog = (BottomSheetDialog) super.onCreateDialog(savedInstanceState); final View view = View.inflate

BottomSheetBehavior with two RecyclerView

谁说胖子不能爱 提交于 2019-12-05 04:54:16
问题 I got two RecyclerView inside a LinearLayout with a BottomSheetBehavior. When you click on a item inside the first RecyclerView (with a grid) the RecyclerView is set to Gone and an the second RecyclerView (with a list) is shown. When the second Recycler is shown you cant slide the BottomSheet up and down instead the List is scrolling even in Expanded State. If the First Recycler is up everything is fine. Is there a way to make the BottomSheet to slide up and down again? <LinearLayout android

How can BottomSheetBehavior, AppBarLayout.ScrollingViewBehavior, and AppBarLayout.Behavior work together in unison?

主宰稳场 提交于 2019-12-05 03:22:25
问题 In the GIF below you'll see I'm having trouble coordinating (heh) an AppBarLayout, containing a CollapsingToolbarLayout, and a Persistent BottomSheet in such a way that they play nicely together Goal: Have the fragment contents, seen above in turquoise (#26999f), remain above, yet scroll behind, the BottomSheet, seen above in dark green (#12783e), while also respecting the AppBarLayout and its Behavior Again, as you can see from the GIF I'm close; the fragment contents is using a custom

Why am I able to click “behind” the bottomsheet in Android?

空扰寡人 提交于 2019-12-04 15:38:57
问题 I have a BottomSheet in my Activity. I'm calling behavior.setState(BottomSheetBehavior.STATE_EXPANDED); to show the bottom sheet and it works fine, but the problem I have is that I can somehow click on the empty space of my bottom sheet to trigger onClick event of a view that is behind the bottom sheet. Is there a way to prevent this from happening? 回答1: A simple solution is to add the android:clickable=true attribute to the layout that you are using for your bottom sheet. That way it will

Bottom Sheet Android- Scrolling issue

淺唱寂寞╮ 提交于 2019-12-04 07:10:57
I need the bottom sheet to stop at two positions. I have the following code for Bottom Sheet. <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/main_content" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true"> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent"> .... </RelativeLayout> <FrameLayout android:id="@+id/bottom_sheet"