StylingAndroid / Rialto

Apache License 2.0
259 stars 10 forks source link

[WIP] Make Rialto Views open #6

Closed ubuntudroid closed 5 years ago

ubuntudroid commented 5 years ago

This makes all Rialto Views in all flavors open to enable Rialto features in View subclasses as well.

Consider this PR a fallback solution if we don't find another more generic solution for #5, I'd like to keep it open until we've come to a conclusion there.

If we decide to go with this PR's solution we might also want to make the delegates non-internal in case people don't want to/cannot subclass Rialto views.

PS.: I've also sneaked in version bumps for AGP and Gradle to make the project compatible with AS 3.4 stable.

StylingAndroid commented 5 years ago

I'm really not happy with this approach, I'm afraid. One of the design goals with Rialto is to keep the API clean, and making these classes open really muddies the API, imo.

While I accept that the current implementation is flawed because it does not support subclasses of TextView, I really don't think that this is the right way to solve the problem - there need to be changes to the internals to keep the outwards-facing API clean. I'm working on some ideas around this but it will take a little time for me to get them implemented because of upcoming commitments.

This feels like a quick and dirty hack which I'm not comfortable with, so I'm closing this for now. I really don't want to release a new version which contains a muddied API that people may start developing against, and then things get broken because I restrict the API again once I feel the internals are right. But if my ideas for doing this in a clean way do not work out, then I may re-open it.

ubuntudroid commented 5 years ago

Fair enough. Looking forward to your PR. Thanks for looking into this! :)