robinhood / spark

A simple Android sparkline chart view.
Apache License 2.0
1.28k stars 157 forks source link

Change private members to protected for better inheritance support #39

Closed RichyHBM closed 6 years ago

RichyHBM commented 6 years ago

Well the main issue I had was for example when inheriting to add the different fill color it was quite hard to get access to certain parts, specifically things like adding new attributes and stuff. In the end I needed to overwrite a number of functions without calling the parent function.

Maybe a better solution would be to allow for protected functions, and add getters and setters for the variables?

danh32 commented 6 years ago

The main issue is a lot of this stuff is meant to be implementation detail, not public api. So exposing it causes us to commit to these details, vs being flexible to changes in the future.

So I do think if you have a smaller set of these that you have a particular use-case in mind for, I'm open to considering. But I definitely don't want to make a blanket policy of everything being protected.

RichyHBM commented 6 years ago

OK, that's fair enough, maybe best to close this and I'll submit a PR if anything specific comes to mind

danh32 commented 6 years ago

Sounds good to me! Sorry about the back and forth!