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:

170 questions
0
votes
0 answers

Column based RecyclerView (GridLayoutManager)

Does anybody know how to force the LinearLayoutManager or even GridLayoutManager to act like on the screen? The whole list will be not scrollable, just a reordering the list of items in to columns and rows (constants defined in the code, or…
0
votes
0 answers

RecyclerView mixes the scroll item scroll position

During the vertical scroll RecyclerView mixes the main adapter item's horizontal scroll position. MainActivity's code: LinearLayoutManager layoutManager = new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false); recyclerView =…
0
votes
1 answer

RecyclerView scroll to position of child view's child

I want to scroll to the position in the picture: Here is my code but there is NullPointerException public class ViewMenu extends LinearLayout { protected Handler mHandler; @BindView(R.id.recycler) protected RecyclerView mRecycler; …
0
votes
2 answers

Unable to Restore the Scroll Position in RecyclerView using LayoutManager

So, I have an EditText on which I have set onEditorActionListener, i.e after the user enters the text and presses enter/search it will fetch the details and populate the recycler view accordingly. Now in order to save the state on a configuration…
hsm59
  • 1,991
  • 19
  • 25
0
votes
1 answer

LinearLayoutManager - repetition in a circle

Is there any easy way to make LinearLayoutManager to be as a circle (repetition items in a circle)? I investigated it and found only way to make own custom LayoutManager, so it would be cool to find a way with less code
0
votes
1 answer

how to make recyclerview slide horizontal

i made a recycleview that works just fine and gets the data and show it but i want that instead of vertical scroll it will be horizontal scroll. i searched and read that to control the scroll orientation behavior i need to use the…
0
votes
1 answer

Align recyclerview item to Top when there is only one content

My recycler view implementation seems to align properly to the top if the data source contains more than one data, but with only one data the item centers vertically. How can I prevent this?
Jojo Narte
  • 2,767
  • 2
  • 30
  • 52
0
votes
2 answers

how to let item scroll to top of the Recycleview when using LinelayoutManager.scrollToPositionWithOffset?first time not effect

i want to let the recycleview item scroll to top by click one button.and i use lineLayoutManger.scrollToPositionWithOffset(position,0); the position is i want to scroll item postion.but when i go into the Activity and have init the adapter.but…
empt
  • 133
  • 1
  • 10
0
votes
0 answers

How can check horizontal RecyclerView direction in android?

Description: I am using RecyclerView with LinearLayoutManager horizontally. In this, i am trying to get the direction. Recyclerview is moving from left to right or right to left. Here is my code: holder.recyclerView.addOnScrollListener(new…
Milan Gajera
  • 962
  • 2
  • 14
  • 41
0
votes
5 answers

Centralizing RecyclerView with LinearLayoutManager

I am trying to centralize a RecyclerView list in the screen. Its going to be a single list, so I will use the LinearLayoutManager (LLM). However using the LLM its not centralizing the items, and it looks like this on the landscape mode: The XML…
David Pena
  • 163
  • 3
  • 9
0
votes
0 answers

layoutManager.findFirstVisibleItemPosition() with a horizontal RecyclerView

I am coding an Android application for a school project. I have implemented a RecyclerView with horizontal scroll using LinearLayoutManager.HORIZONTAL. I would like to make it such that a specific element, for example element n, is in the middle of…
meeps
  • 59
  • 1
  • 7
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
  • 445
  • 1
  • 9
  • 22