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

Sliding effect issue: Background inset causing overflow and black edges #600

Open
moonyoulove opened this issue May 8, 2024 · 0 comments

Comments

@moonyoulove
Copy link

<inset android:drawable="@mipmap/ic_launcher_background" android:inset="16.7%" />

When using a value of 16.7% as the inset for both foreground and background, it will cause parts outside of the background to be revealed during the sliding effect, making it appear as if the sliding has exceeded the boundaries.

Safe zone within a rounded square mask
This is an example image(source) being used. Theoretically, the foreground icon should be drawn within a range of 66dp or 72dp, rather than being drawn within the entire image range, as some parts will be clipped.

all icons masked
By limiting the drawing range to that of the example image, icons of various shapes can be well adapted without being cropped.

scale to small
If both foreground and background use inset (25% for emphasis), it will result in the appearance of black edges.

maybe correct
Would it be more feasible if only the background uses inset? Or should the drawing range be directly reduced when designing icons?

affect croped
This is a preview of the sliding effect, where you can see black edges appearing around the example icons.

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

No branches or pull requests

1 participant