card view not showing up

后端 未结 1 1212
慢半拍i
慢半拍i 2021-01-15 16:37

I am implementing card view through recycler view in android but my card view is not showing up. I am using custom adapter to populate data to card view. I have tried all th

1条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-15 17:19

    Change your getItemCount() method to this:

    @Override
    public int getItemCount() {
        return mImage.length;
    }
    

    Right now you are saying your adapter has 0 items, hence why it's not drawing anything.

    0 讨论(0)
提交回复
热议问题