I have a BottomSheet with some non-clickable content. This BottomSheet is sliding over a RecyclerView.
Problem is when I tap on the BottomSheet, the RecyclerView item behind it fires (which of course shouldn't happen). The list also scrolls when scrolling on the BottomSheet.
I've tried to set android:clickable=false on the container of the BottomSheet with no effect.
Is there an obvious trick for preventing that?
You need to set android:clickable=true on the container of the BottomSheet instead of android:clickable=false.
Related
I have ScrollView and inside this ScrollView are some independent Views. What I want to achieve is if View A touches top of ScrollView, it will start animating - transforming instead of hiding out of ScrollView (visible screen).
It should have "collapse" effect but not completely collapsed. This View A is not toolbar or action bar so I cant use CollapsingToolbarLayout
I want to achieve "paralax" effect on custom View instead of ToolBar. With certain child views inside this View should animate/shuffle/hide as I scroll. I cant find any native solution to this only default Toolbar.
I have a MotionLayout which basically contains an image and a ViewPager. The ViewPager renders a fragment with a RecyclerView in it.
At first the image has normal size, when i drag up, the image reduces its size and the ViewPager (with the RecyclerView within it) expands.
The problem is that the MotionLayout keeps intercepting the scroll action, so if the RecyclerView is expanded, and the user scrolls down, the MotionLayout will expand the image, rather than letting the RecyclerView scroll.
What i would expect is that the MotionLayout will expand the top image only if the RecyclerView has reached the first element, in that case since the RecyclerView cannot scroll anymore, the scroll action would be managed by the MotionLayout.
I am aware that within MotionLayout I can set the attribute moveWhenScrollAtTop="true" to get that behaviour, but that only works if there is just a RecyclerView, but not if the RecyclerView is within a ViewPager.
Has anyone faced this issue?
if your xml file contains nested scrollview just add android:nestedScrollingEnabled="false"
I have more than two Recyclerview all visible at the same time, but they are not scrollable, I know very well that Bottomsheet allows only one child to scroll, but I have put this question so that I can get some other way around, or some hack to this possible.
And I even want to add a button to the touchable view of Bottomsheet, exactly
at the top of bottomsheet, not at the upper corners/ends (all these things, I have already tried.)
Thanx in advance.
I have one RecyclerView inside Bottom Sheet and I don't want recyclerview to be scrollable inside it. But here I am facing a problem that Bottom Sheet expand and Collapse swipe property interfere with Recyclerview scroll and nothing is happening when I swipe. Please help me to solve this issue.
So I am using the new support library behaviour for nested children scroll inside CoordinatorLayout and I have a view like this:
<com.....TodayBottomSheet
android:id="#+id/bottomSheet"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="#string/bottom_sheet_behavior"
app:behavior_hideable="false"/>
I have a requirement in my app, which isn't new and I need to temporarily disable scrolling of certain elements of a coordinator layout. For this bottomSheet, I need to disable the 'manual' scroll which will get triggered when touching and dragging the bottom of the screen. My requirement is to open/close the bottom sheet by pressing a button. I know how to do it programmatically, I just know how to disable the manual scroll.
And another problem which is related to this one, I need to temporarily disable recyclerView scroll listener when a certain action happens. I don't know how to do it since all the scrolling child of a coordinator layout are controlled by himself.
Check this solution.
Basically, onBottomSheetBehavior.STATE_DRAGGING set BottomSheetBehavior.STATE_EXPANDED.