I would first check that the data you receive from firebase is correct.
Put each variable in a label to see if you get each list correctly.
In the procedure you make a difference between odd and even numbers. And you assign a different arrangement to each one. But you assign the same ID.
For the cardviews you are using a vertical arrangement and you should use a Vertical Scroll Arregment.
And if you create 2 cardviews, they should have 2 different IDs. And then create 2 dynamic images with different IDs
I already separate it with "for each number"and the arrangement in create image, so when the number is 1 the image is arrange in card view id 1 which is in vertical 1 and when the number is 2 is in card view id 2 and vertical 2 its correct?