RecyclerView expandable cardView

后端 未结 3 710
走了就别回头了
走了就别回头了 2021-01-11 21:47

I make small project with RecyclerView with CardView items inside. I created expandable card (expanded by pressing on small button inside the card). Each card always contain

3条回答
  •  走了就别回头了
    2021-01-11 22:23

    You can use this lib instance your self developed way, try this:

    STEP 1: Add below dependency to your build.gradle file:

    **compile 'com.github.traex.expandablelayout:library:1.2.2'** use instead of
     compile 'com.github.traex.expandablelayout:library:1.3'
    

    STEP 2: Add below View to Your card layout ,card_layout Must be look like this:

    
    

    STEP 3: In your define of RecyclerView remember to:

    recList.setItemViewCacheSize(ITEMS_COUNT);
    

    Feel free to Ask :-)

提交回复
热议问题