Questions tagged [recyclerview-layout]

RecyclerView is a more advanced and flexible version of ListView. It was introduced with the Android L Developer Preview, but is also available as part of the Support Library.

RecyclerView is a more advanced and flexible version of ListView, introduced in the Android L Developer Preview but also backported to the Support Library. It is a container for large sets of views that can be recycled and scrolled very efficiently.

Yo use a RecyclerView, an adapter (extending RecyclerView.Adapter) and a layout manager (extending RecyclerView.LayoutManager) must be provided. By default, RecyclerView provides LinearLayoutManager, which shows the items in a vertical or horizontal scrolling list.

Official Documentation

Tag Usage:

436 questions
0
votes
1 answer

Exception raised during rendering, using RecyvlerView

I am trying to use RecyclerView in my app. Code: The Activity: public class TecnicoActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); …
Fustigador
  • 6,339
  • 12
  • 59
  • 115
0
votes
4 answers

RecyclerView show data from 2 different layouts

I am using the following code in Adapter class to show data in a RecyclerView, but now I would like to show data from some other ArrayList in a same RecyclerView (at some positions like: 1st position and 6th position) using different layout. That…
Sophie
  • 2,594
  • 10
  • 41
  • 75
0
votes
2 answers

Why recyclerView is not showing all the items?

I made a RecyclerView in android, with a tab layout and a fragmented Activity. The problem is All the View are not being shown. The first 2 Views are always being omitted. Here is the code of my fragmented activity. public class Listee extends…
0
votes
1 answer

Can we use 2 different layouts in Recycler view in android

Can we use 2 different layouts in Recycler view in android, i want to show listview and gridview on the button clicks, though in both layouts there r diff data item .in list there r 2 textview and in Gridview there is 1 imageview n 2 textviews
0
votes
2 answers

Recyclerview selected item's background image too large on smaller screen devices

I have a RecyclerView that has CardView to display items. The items contain image views and TextView that would be populated once the user selects an item. Once they select an item I retrieve the selected item's background and fire an intent to…
The_Martian
  • 3,684
  • 5
  • 33
  • 61
0
votes
2 answers

How to make multiple views in recyclerview item clickable?

I have this adapter class where I have an object with a list in it. public class ProductAdapter extends RecyclerView.Adapter { private Context context; private Shop shop; public ProductAdapter(Context context, Shop…
jlively
  • 735
  • 2
  • 9
  • 29
0
votes
1 answer

Why is the context being cast within this RecyclerView Adapter?

The editTask method is overriden at TaskListActivity Class which implements the OnEditTask interface. Why are we using the context and casting it to OnEditTask interface? What principle of interface or java am I missing here? This is a code from…
mhrzn
  • 379
  • 1
  • 4
  • 18
0
votes
0 answers

Get itemView at specific position in adapter for RecyclerView

I have a problem with get itemView in my adapter for preselect element in RecyclerView. In my activity I have: recyclerView = (RecyclerView) findViewById(R.id.activityRecicler); layoutManager = new LinearLayoutManager(this); …
LorenzoBerti
  • 6,704
  • 8
  • 47
  • 89
0
votes
0 answers

RecyclerView Adapter getItemCount not called for IceCreamSandwich

There is a case where getItemCount within the RecycerView Adapter is not called for Android 4.0.3 (IceCreamSandwich). All other API versions don't have any problems. I create my adapter as follows: Log.i(LOG_TAG, "array size = " +…
Mike Walker
  • 2,944
  • 8
  • 30
  • 62
0
votes
1 answer

RecyclerView Margin

i am developing application for home security. One of the feature, that must be implemented is the ability to see connected devices (for sending notifications, blocking access, etc). So far, i've been able to create RecyclerView list of the devices,…
Ivan Zhivolupov
  • 1,107
  • 2
  • 20
  • 39
0
votes
1 answer

RecyclerView loads list of images with endless scrolling

I'm making an app that shows some beautiful girls in RecyclerView with load more when scroll to bottom. And i am stuck with few issues, you can see it in videos link here. Or: I. When add more items, it shows only one column not all 3 columns as…
0
votes
2 answers

Android Custom Layout Manager with scroll both vertical and horizontal and fill items by vertical first

I'm developing an Android application. One of the screens has UI like that: Mockup-UI It means: there are a number of columns, the width of column is fixed too, so maybe be it need to scroll horizontally. Each column may have different items number…
0
votes
1 answer

How to align height two TextView in custom layout?

I have problem in my custom layout how to set height on the gray TextView to make it look the same as yellow TextView. Yellow TextView allow multiline but grey support only single line. Below my custom layout. P.S. I set rounded background directly…
0
votes
1 answer

Add the new items display top of position in Recycler View

If I add new Item to wishlist RecyclerView can added only at last row, but i want to display at top of 0th position in RecyclerView. I tried to display first position of RecyclerView, but Its doesn't workout well. Code data.add(new…
Nivethitha
  • 91
  • 1
  • 3
  • 16
0
votes
1 answer

Why does RecyclerView not have wrap_content property?

The question is not about what is the workaround as that has already been solved by using a custom layout-manager. My question is as to why android did not provide this functionality? Is it because of the fact that wrap-content will make the…
Msk
  • 857
  • 9
  • 16