cymcsg / cymcsg/UltimateRecyclerView

Access first and last card?

Open
#85 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
7.2k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

I have setup a recycler view that displays a card layout using adapter. I need to set the padding of first and last card only. Is there any way, I can access the card directly?

After setting up the adapter for recycler view, I tried to accesse the first card by using following code, but it always returns null. Any help is appreciated.

CardView cv = (CardView)recyclerView.mRecyclerView.getChildAt(0);

where recyclerView being the Instance of UltimateRecyclerView.

Contributor guide

No contributing guide indexed for this repository

Research direction

No source files or tests are named in the issue. Start by reproducing the RecyclerView setup described and inspect how UltimateRecyclerView exposes its child views; done means establishing and documenting a working way to apply padding only to the first and last cards.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.