Questions tagged [android-concatadapter]

16 questions
5
votes
2 answers

Multiple LayoutManager in ConcatAdapter

I want to implement an ConcatAdapter like this image: This page's recyclerView contains these elements: Title Horizontal recyclerView (with pagination) Title Vertical recyclerView (no pagination) Title Horizontal recyclerView (with…
4
votes
2 answers

ConcatAdapter causing getItemViewType() to return the wrong value?

I have a RecyclerView adapter that takes care of several view types which I've been using for years. Recently, I found out about ConcatAdapter, but I seem to be running into an issue where it seems to be returning the wrong value for…
4
votes
0 answers

ConcatAdapter how to change scroll position of inner RecyclerView that is located in an Adapter from another Adapter?

In the image section with Favorites and the horizontal RecyclerView is one adapter, adapterFavoriteProperties, while the row with chart is another adapter, adapterChart, of the main RecyclerView. Main RecyclerView is composed of rows that coming…
3
votes
1 answer

How to add dividers/spaces between Adapters of concatadapter in Recylerview

How to add dividers/spaces between Adapters of concatadapter in Recylerview We can create ConcatAdapter using multiple adapters in Android using concatenated = new ConcatAdapter(adaplterlist); recyclerView.setAdapter(concatenated); I want…
1234567
  • 2,226
  • 4
  • 24
  • 69
3
votes
1 answer

Setup margin/padding between different adapters in ConcatAdapter Android

Is it possible to set up spaces (margin/padding) between different adapters in ConcatAdapter? I have just a simple sample of code, like below, but according to the design I have to add margin exactly between different adapters (not holder items in…
2
votes
0 answers

Restore scroll state of nested recyclerview in ConcatAdapter

I'm using the new ConcatAdapter & the Android navigation component to create a complex recyclerView which contains nested horizontal scrollable lists. I'm trying to restore the state of these nested lists on rotation, navigation, etc. I've read this…
Tim
  • 669
  • 1
  • 8
  • 27
1
vote
2 answers

Android ConcatAdapter scrolls to the top when prepend elements but keep the position when append

I am making a movie list with RecyclerView and ConcatAdapter. The ConcatAdapter consists of three different adapters, HeaderAdapter, MovieAdapter and FooterAdapter. HeaderAdapter - displays either of progress bar, load error, or normal header. Its…
1
vote
0 answers

How to use different adapters with multiple view types inside the same ConcatAdapter?

I have a ConcatAdapter that uses one PagingDataAdapter (wrapped by its own ConcatAdapter by calling withLoadStateFooter and a normal ListAdapter): val concatAdapter = ConcatAdapter( newChatMessagesAdapter, // this is a ListAdapter …
0
votes
1 answer

call notifyItemRangeChanged on child adapter of ConcatAdapter doesn't work

I have two adapters inside a ConcatAdapter, when I invoke notifyItemRangeChanged() on one of the child adapters, the RecyclerView does not response. For details, before I call notifyItemRangeChanged(), I added some data to the child adapter. Say the…
0
votes
1 answer

sequence concatadapter based on data type

is it possible to use concatadapter based on data type. normal implementation of concatadapter is val concatadapter = listOf(firstAdapter, secondAdapter, thirdAdapter) while trying this code, for (nums in 0..15) { if (nums % 2 == 0) { …
RedOctober
  • 13
  • 4
0
votes
1 answer

Is the RecyclerView absolutely wrong when there is only one item?

I'm making a function that looks like an image. Although not shown in the image, these items can be added or deleted through the button. Item is composed of Header and Detail. The adapter also has HeaderAdapter and DetailAdapter respectively. I'm…
ybybyb
  • 1,385
  • 1
  • 12
  • 33
0
votes
0 answers

Why my app crashes when search not found any match after implementing ConcatAdapter in Android Kotlin?

I just implemented my first ever concatAdapter. Since then when I enter some text in the search field, the app crashes when there's no item that matches the search key, if it matches then it returns the result without errors. Before using the…
0
votes
0 answers

What's the difference between multiple view type and ConcatAdapter?

I've been looking at recyclerview lately and I'm not understanding the difference between multipleview with one adapter versus ConcatAdapter with each adapter having its own view. Say for example I have a recyclerview with 5 differents views Why…
Biscuit
  • 4,840
  • 4
  • 26
  • 54
0
votes
1 answer

Swapping adapters inside the ConcatAdapter

I need to swap two adapters inside the ConcatAdapter but the list of adapters that is returned by getAdapters() is immutable and won't let me use the java.util.Collections utility. So far what I've tried was to turn that list into a mutable list,…
0
votes
0 answers

Is there any way to apply two recyclerview layouts when using ConcatAdapter?

(RedBox is MainItem, Blue Box is SubItem) I want to list another RecyclerView item(Sub Item) inside a RecyclerView item(Main Item) as shown in the picture. In fact, this has already been implemented. I implemented it by using SubAdapter in…
ybybyb
  • 1,385
  • 1
  • 12
  • 33
1
2