ExpandableBottomBar icon indicating copy to clipboard operation
ExpandableBottomBar copied to clipboard

Refactor: Replace findViewById with ViewBinding in ExpandableBottomBar examples

Open JungWooGeon opened this issue 1 year ago • 1 comments

Hello!

While using the ExpandableBottomBar library in this project, I noticed that the examples were heavily relying on findViewById. This method can lead to potential errors and affect the code readability.

To improve this, I refactored the examples to use ViewBinding in 'mybranch'. ViewBinding ensures type safety and null safety, which can reduce potential errors and improve readability.

While there was no open issue regarding this, I believe this change could significantly improve the overall quality of the examples provided with the library.

Although I do not have any comparison images, I can assure you that the change has made the examples more concise and safer by preventing potential null pointer exceptions.

Thank you for considering this contribution.

JungWooGeon avatar Jan 07 '24 08:01 JungWooGeon

Hello @JungWooGeon 👋

Thank you very much for your contribution.

This method can lead to potential errors and affect the code readability.

Can you, please, elaborate on what the potential errors are? I am also interested in benefits that view binding brings as this is not straight-forward to me.

st235 avatar Mar 24 '24 21:03 st235

As I have not heard from you for a while I will close the PR. Thank you very much for contributing and using the library!

st235 avatar Aug 17 '24 10:08 st235