luizgrp / SectionedRecyclerViewAdapter

An Adapter that allows a RecyclerView to be split into Sections with headers and/or footers. Each Section can have its state controlled individually.
MIT License
1.68k stars 372 forks source link

addSection and getSection by index; getSectionCount #164

Closed luizgrp closed 5 years ago

luizgrp commented 5 years ago

Add features requested in #152 and #154

luizgrp commented 5 years ago

@yccheok could you please review it? if you are happy with these changes we will release a new version

codecov-io commented 5 years ago

Codecov Report

Merging #164 into develop will increase coverage by 0.33%. The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #164      +/-   ##
===========================================
+ Coverage    88.05%   88.39%   +0.33%     
===========================================
  Files            4        4              
  Lines          536      543       +7     
  Branches        78       78              
===========================================
+ Hits           472      480       +8     
+ Misses          45       44       -1     
  Partials        19       19
Impacted Files Coverage Δ
...ectionedrecyclerviewadapter/SectionParameters.java 85.18% <ø> (-0.78%) :arrow_down:
...yclerviewadapter/SectionedRecyclerViewAdapter.java 90.64% <100%> (+0.53%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5511bd2...58416f2. Read the comment docs.

yccheok commented 5 years ago

Thanks for asking. I will review them ASAP.

FYI, currently I don't need this feature as I had changed my requirement. However, not sure this feature is applicable to others?

Just pondering, is will there be any potential performance impact, if we were changing the underlying data structure to Apache?

Thanks.

On Fri, May 24, 2019, 6:35 AM Gustavo Pagani notifications@github.com wrote:

@yccheok https://github.com/yccheok could you please review it? if you are happy with these changes we will release a new version

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/luizgrp/SectionedRecyclerViewAdapter/pull/164?email_source=notifications&email_token=AACLINH6UL2TBJX66XQ6763PW4LZ5A5CNFSM4HPIYHF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWDVPJI#issuecomment-495409061, or mute the thread https://github.com/notifications/unsubscribe-auth/AACLINBRXKC2PRUMSAQQUPLPW4LZ5ANCNFSM4HPIYHFQ .

luizgrp commented 5 years ago

Hi @yccheok, thanks for reviewing it!

1) Not sure which one is the best, I guess we would have to search for a benchmark comparing the solutions out there. I guess we could compromise with this one and see how it goes and change if necessary?

2) The previous commit has 98257 bytes and this commit has 98843 bytes, so it's adding 586 bytes.