Skip to content
Advertisement

why is my recycler view only showing 1 card

the app is used to sign up for events. Now I am unable to display more then one card in the recycler view even though there is data in the database.it only would display only the first row of data. I know this as I have deleted the first row and the app shows the new first row. The php works as i have loaded the page and it gives me the data from the database.

recycler view activity

JavaScript

recycler view adpater

JavaScript

activitydisplay.php

JavaScript

edit 1:add xml code

main activity 2

JavaScript

card xml

JavaScript

Advertisement

Answer

It is because the LinearLayout of the card has match_parent as its layout_height and layout_width so it is taking up the whole space. Can you try to scroll the card up?

JavaScript

The layout_height should be wrap_content.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement