Questions tagged [linearlayoutmanager]

A RecyclerView.LayoutManager implementation which provides similar functionality to ListView. It was introduced with the Android L Developer Preview along with RecyclerView, but is also available as part of the Support Library.

LinearLayoutManager is an implementation of RecyclerView.LayoutManager which provides similar functionality to ListView, i.e., it arranges items in a linear arrangement, either horizontal or vertical, much like LinearLayout ViewGroup. It was introduced with the Android L Developer Preview along with RecyclerView, but is also available as part of the Support Library.

Official Documentation

Other RecyclerView.LayoutManager implementations:

160 questions
0
votes
3 answers

Change Background of RecyclerView Item at specific position

I have a RecyclerView and clicking its item takes to a new Activity. There is a ViewPager with multiple items. On pressing back, I am saving the current item position. What I want to do is when a user presses back while standing on any item in a…
0
votes
2 answers

RecyclerView - Horizontal LinearLayoutManager create / bind methods called way too often

Currently I'm at the end of my ideas on following issue with LinearLayoutManagers and RecyclerViews on Android: What scenario I wanted to achieve A horizontal RecyclerView on which the user can swipe very fast without any limitations on fling. The…
0
votes
1 answer

Android RecyclerView plus ViewPager

I have a ViewPager that utilizes a RecyclerView for each page and shares ViewItem rows across pages. Accordingly I share a single RecyclerViewPool between them. However, the ViewPager loads each RecyclerView whether or not it is the page on screen.…
0
votes
1 answer

how to get LinearLayoutManager from RecyclerView..?

so I had my RecyclerView In fragment tab, as usual using LinearLayoutManager and I also want to use for Endless scroll ScrollListener,the problem is if I make a variable LinearLayoutManager in OnCreate method as below public override void…
0
votes
2 answers

Recyclerview fully scroll to position

My recyclerview should open the first item closed. To this end, I wrote these lines. LinearLayoutManager llm = new LinearLayoutManager(getActivity()); llm.scrollToPosition(1); paletteRecyclerView.setLayoutManager(llm); I want to check if it is…
Butterfly
  • 375
  • 1
  • 7
  • 21
0
votes
2 answers

Recyclerview not able to control view

I am using a RecyclerView with LinearLayoutManager thats horizontal. I am displaying 3 items per view and using endless scrolling. My issue is that they're 3 images and I want the middle image to be enlarged by 2X but I can't get control of the…
0
votes
1 answer

Unable to cast LinearLayoutManager to GridLayoutManager

if (mLayoutManager instanceof GridLayoutManager) { ((GridLayoutManager) mLayoutManager).setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() { @Override public int…
0
votes
1 answer

RecyclerView LayoutManager - force to keep a view even if not visible

I am animating views between two RecyclerView. The first one is something like a list of folders showing the first item as cover, clicking it opens a new view showing the folders content animating the cover to the first item. Clicking back animates…
prom85
  • 14,805
  • 15
  • 98
  • 206
0
votes
1 answer

List item views not correctly appearing in Linear RecyclerView

Hello I have a horizontal recyclerView that should display a picture and below it a name. I can't get this to work as the image views appear of different sizes, even though they have fixed dimensions, and the text below is either not visible or…
0
votes
1 answer

Horizontal RecyclerViews inside Vertical RecyclerView losing position/state

I have a vertical recyclerview, eatch item of the vertical recyclerview have a horizontal recyclerview, all items of the horizontal recyclerview have diferent withs and the same height, i'm scrolling the recycler programatically with distances in…
0
votes
0 answers

Different types of rows in RecyclerView

I receive data (an object with few elements inside) from a server and I want to show it in RecyclerView. Each object could contain 2, 3, 4.. or even 18 elements (as on the picture): I know how to create different types of rows from pre-created XML…
0
votes
1 answer

How to change icon using list to grid

I am changing list to grid and grid to list using StaggeredGridlayoutmanager, but i want to change icon while changing the view,,like if view is in list mode i want to display grid icon and and view is in grid mode i want to display list mode case…
0
votes
1 answer
0
votes
1 answer

Android: Custom LinearLayoutManager not allowing recyclerView to scroll

I am using a custom LinearLayoutManager to disable/enable scrolling for my recyclerView. public class CustomLayoutManager extends LinearLayoutManager { private boolean isScrollEnabled = true; public CustomLayoutManager(Context context) { …
rahul
  • 5,837
  • 3
  • 25
  • 39
0
votes
1 answer

LinearLayoutManager prepareForDrop not fired

I'm trying to catch the point when a Recyclerview item is dropped after a drag&drop operation, e.g. to read out the coordinates. Thought that prepareForDrop event of LinearLayoutManager would be the right thing for that: public class…
1 2 3
10
11