This repository was archived by the owner on Jul 11, 2025. It is now read-only.
Add the styles for v31 to have clipToOutline attribute#246
Merged
Conversation
Adding clipToOutline to true for the background of the view is needed and recommended for the inner view of the widget for v31. This PR adds the styles for v31 with explanation. Also update the AGP to 4.2.1.
Contributor
Author
|
I appreciate if you have a look, too. @yogishadixit . |
yogishadixit
suggested changes
May 27, 2021
| <style name="Widget.AppWidget.AppWidget.Container" parent="android:Widget"> | ||
| <item name="android:padding">?attr/appWidgetPadding</item> | ||
| <item name="android:background">@drawable/app_widget_background</item> | ||
| <item name="android:clipToOutline">true</item> |
There was a problem hiding this comment.
Potentially silly question: Can we just add this to values-21/styles.xml? It looks like clipToOutline was added in API 21
Contributor
Author
There was a problem hiding this comment.
It's not a silly question :) I originally had the same question. Although clipToOutline was introduced in API 21, the XML attribute was introduced in API 31.
yogishadixit
approved these changes
May 27, 2021
yaraki
approved these changes
May 31, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adding clipToOutline to true for the background of the view is needed
and recommended for the inner view of the widget for v31.
This PR adds the styles for v31 with explanation.
Also update the AGP to 4.2.1.