I have view pager with list of child views. Every child is horizontal view. When horizontal view is not active view pager not scroll to the next page. If horizontal view is active then It scrolls horizontally but in horizontal scroll view. I need to scroll to next page of view pager if the horizontal view is not active. So I don't know where to handle this action and how to do it.
The following is a complete example of how to implement a ViewPager with different fragment Types and different layout files.
Try This
Related
I want to implement a tab layout with a horizontal swipe or scroll view and in each tab view, I could be able to scroll vertically. For reference just like WhatsApp where there are tab layouts that are horizontally scrollable or swipeable and in each tab layout there is a vertical scroll view in kotlin.
Problem I am facing -
I have implemented the recycler view in each tab layout but the problem is when I am setting the height of the recycler view as match parent then I am only able to scroll vertically as it is in the focus and when I am setting the height of viewpager2 as match parent then I am only able to swipe through the tabs. If you have any solutions for that please give.
enter image description here
Here what I tried:
I can able to achieve this layout using Wrapping Horizontal scroll view and recyclerview inside Nestedscroll view.
The problem is :
When I put recycler view inside any of the scrolling containers such as scroll view or Nested scroll view
Its loading all the items in recylerview at once which is not a implementation of recylerview,hence pagination is not achieved.
Requirement:
1.Top header cards should scroll horizontally which is of a (fixed) Limited size.
2.Label for the vertical scroll view
3.Recycler view for vertical scroll of items
All the above should scroll vertically.Please help, or suggest any better way doing this layouot.enter image description here
Yes you can achieve this by having parent layout as <nestedScrollView> and in child you can take 2 recycler view of which one of them should be horizontal and another should be vertical.
set property android:nestedScrollingEnabled:true and your are good to go.
I have a ViewPager and scrolling list view items but I want height of the ViewPager be dynamic based after list view scrolling. So When I scroll list view items towards view pager, three view pager on one screen should changing its height.
My ViewPager and list view looks like this.
and I want to achieve this view after scrolling my list view towards viewpager so first and third both corner view pager with middle one should change its view like this.
I tried Sticky Header library to achieve this but I didn't get success.
Please help me achieve this or is there any library to do this ?
I have two Recycler views inside a LinearLayout in a fragment. one horizontal recycler view at the top of fragment and below that a vertical recyclerview. What i want to do is to add items from the vertical Recyclerview to horizontal Recyclerview by long touching the items.each of Recyclerviews has it's own adapter.how can i add/remove items to/from the top RV and refresh the view at the same time?
I have a Grid View inside a View Pager and every thing is working fine, except while swiping the pages if we touch on grid view and swipe, it is not changing the page.
If we touch on the remaining part of the view pager only swipe is working.
I tried disabling the touch functionality of grid view and also disable vertical scroll of the grid View, but it doesn't work. Please help me out!