Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(WIP) Use just elevation with ViewOutlineProvider for android #19

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

edusperoni
Copy link

@edusperoni edusperoni commented Apr 7, 2019

DO NOT MERGE

Further testing is needed for this approach. We're overriding the ViewOutlineProvider for the view and adding the shadow outline if not outline is provided by the background.

It's much faster than the current approach with very low overhead.

This is also compatible with the new NativeScript/NativeScript#7055

This might (can?) be an issue when the view sets clipsToOutline, but I haven't found an instance of when that happens.

@edusperoni
Copy link
Author

@JoshDSommer soon this plugin may be redundant, as shadow support is being added to the core (albeit limited for iOS). I'm thinking about removing the Shape for the shadow on android entirely, along with bgcolor, so we don't override the background anymore.

I think RING and LINE shapes are already useless because we're not setting inner radius, thickness and stroke for the shapes.

My current thinking is: shape is always a rectangle, if you want oval, just use border-radius 50% (it'll be needed for the color/shape of the background anyway).

I believe the future of this plugin is providing shadows for NS < 5.4 and extending the core functionality on iOS (shadow color, offset, etc).

What do you think?

@JoshDSommer
Copy link
Owner

@edusperoni I think this plugin becoming redundant would be a great thing! it would suck to remove functionality for people stuck on older version of NS but they could always install an older version of the plugin.

Ping me on the NativeScript slack, with your NPM email address/username, and I will give you publish access to this plugin on NPM, Very busy with other stuff in life now so I don't want to hold you up by being a gatekeeper to publishing updates for the plugin.

@JoshDSommer JoshDSommer reopened this May 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants