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
1 answer

error in linear layout.vertical. what should be the exact line

mUserListLayoutManager = new LinearLayoutManager(getApplicationContext(), LinearLayout.VERTICAL, false); LinearLayout.Vertical is creating a warning
0
votes
1 answer

Why Recyclerview start scrolling up/down from half of the list?

Actually, I am updating "RecylerView" list adapter based on filter data list. When I update adapter data updated successfully but Scrolling start from half of adapter list. Does anyone face problem like this before? Things i have already tried - Put…
0
votes
2 answers

Detect when the recyclerview has reached the top most position

I have recyclerview that is used to show the chat. I have set the property of the layoutmanager - stackFromEnd - true which is actually used to reach the bottom of the recyclerview. The issue I am facing is that I want to implement paging in the…
0
votes
3 answers

Item overlap in recyclerview

I want to overlap first item on second item in recycler view . this is what I want to achieve: this is how my recycler view is looking now: [] content inside green border is actually a recyclerView and the first item in parent recycler view and…
0
votes
1 answer

How to make a RecylerView like WhatsApp Chat activity?

I building an app which should have a layout almost identical to the one used in WhatsApp in the chat activity. it should have a text input, camera & video recording option. Items should be centered inside the recycler and when the dataset is…
0
votes
1 answer

how to show a bounce effect when scrolling is disabled in a recyclerview?

I have a recyclerview which scrolls horizontally. I have disabled scrolling the recyclerview when user click on an item. Now if the user try to scroll the list when its lock I want to show a bounce effect that he/she cannot scroll further. For…
sagar suri
  • 4,351
  • 12
  • 59
  • 122
0
votes
2 answers

How can i fix the error 'java.lang.IllegalStateException: RecyclerView must not be null'

I have a recyclerView where I send data with my adapter but got the error RecyclerView must not be null code with my adpater: class InWaitingFragment : Fragment() { private lateinit var adapter: FastItemAdapter
0
votes
2 answers

How do I stop my recyclerview from resetting?

I'm developing a chat UI. When I send a message, it inflates correctly. However, when I send another message, the new message is added at the top of a new screen, instead of below the previous message. In addition, when I receive a reply, it added…
user8328256
0
votes
0 answers

How to programatically scroll RecyclerView with a duration?

I have a horizontal RecyclerView and am attempting to programatically scroll by an x value. This has so far been achieved with smoothScrollBy(x, y), however, I can't for the life of me find a solution where I can set a scroll duration, e.g.…
0
votes
1 answer

change LinearLayoutManager to GridLayoutManager

private void setUpRecyclerView() { recyclerView.setHasFixedSize(true); recyclerView.setLayoutManager(new LinearLayoutManager(this)); recyclerViewAdapter = new StoryAdapter(MainActivity.this,…
0
votes
1 answer

Empty space at the end of RecyclerView

I use LinearLayoutManager to show RecyclerView list horizontally XML
0
votes
1 answer

Multiple SwipeRefreshLayout and RecyclerView in wrap_content

I've a layout with 2 SwipeRefreshLayout and RecyclerView, it works only if the layout_height is fixed (ex: 200dp). If it is set to wrap_content, the items are not visible. I've tried a lot of solutions but it continues to not work. My layout:
0
votes
1 answer

LinearLayoutManager.findLastCompletelyVisibleItemPosition() skips items when scrolling

I have a RecyclerView with LinearLayout manager, and I need to interact with last item of RecyclerView in his onScrolled method. I`m using such code: lm = new LinearLayoutManager(getActivity()); ... // rv initializing ... rv.addOnScrollListener(new…
0
votes
1 answer

How to use attribute Gravity inside any TextView in a LinearLayout

Can you explain me please why my TextView don't work on gravity to left . enter image description here A: LinearLayout | orientation=HORIZONTAL | gravity A = top or center or bottom. B: LinearLayout | orientation=VERTICAL | gravity B = left or…
0
votes
2 answers

How to make recyclerview layout manager like stack view?

I want to introduce RecyclerView items like on photo below. Items overlap on each other on the top and every item have different margin from top which depends on vertical position on screen. How can I do it?