I have a layout, I need to use recyclerView and TabLayout and ViewPager in the last item in CoordinatorLayout.
but just recyclerView scroll and show, TabLayout and ViewPager don't show.
anybody can help me?
<CoordinatorLayout>
<AppBarLayout>
<CollapsingToolbarLayout>
<Layout/>
<Toolbar/>
</CollapsingToolbarLayout>
<TabLayout/>
</AppBarLayout>
<ReyclerView/>
<TabLayout/>
<ViewPager/>
</CoordinatorLayout>
What's the size of the RecyclerView? Is it MATCH_PARENT? Try setting a smaller height to recyclerView and check whether the viewPager is visible. You need to enclose all three views inside scrollView and make recyclerView, a nested scroll.
Related
I've a BottomSheetDialogFragment inside a RecyclerView, when is clicked a button BottomSheet is showing. BottomSheetDialog expanding when scrolling down and collapsing when scroll finished on top normally.
But when I place the RecyclerView inside a fragment and lay the fragment to BottomSheetDialog; BottomSheet behaviours not working on the fragment, only works RecyclerView scrolling. On the other hand the behaviours work other places on BottomSheet. How to enable the behaviours as in the first?
You should check that your container layout has app:layout_behavior="#string/bottom_sheet_behavior"> and check that any listener/event you define extra, otherwise BottomSheetDialog normally behaive as you expect.
Good day. I have activity with viewpager 2 (horizontal direction) and fragment which used by this viewpager. This fragment contains collpasing toolbar and nested scroll view with scrolling content. When i triyng to scroll content of my fragment from bottom to top and when, i'am scrolling up, the finger moves a little to the side - the scrolling is interrupted and the horizontal scroll of the view pager is triggered. How i can disable horizontal-scroll of the view pager while i'am scrolling vertical nested scroll view?
I have custom view with extends LinearLayout. Custom view is viewpager with grid view inside. I add "wrap_content" wherever possible, but my view spend whole screen or only one grid's view line.
I find examples GridView with wrap_content function, but it is not help me
I have a layout with two fragments. Both fragments have a Recyclerview. I want, When I scroll any of a recyclerView Then another recyclerView also scrolled automatically. How can I do this?
If you don't see each fragment at the same time, you could get the position of the viewable RecyclerView when you change views, then set the other RecyclerView to the same position.
I have a 'page' that has a number of components on it, and who's content is longer than the height of the device. one of the component is view pager. Content of view pager is also very large. How can i combine vertical scroll view of parent layout and view pager layout.My laytout is as follows:
few components
view pager-(large content in another layout)
few more component
i want to combine scroll view of view pager and parent layout
It should just work. See here -> ViewPager inside a ScrollView does not scroll correclty
You structure should be like this:
ScrollView
-ViewPager
--ScrollView
Then just apply the suggestions made in the linked post above.
Also make sure the ViewPager has a fixed height! Otherwise the ScrollView inside the ViewPager won't work without writing a custom ScrollView or ViewPager.