-
Notifications
You must be signed in to change notification settings - Fork 280
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
Cleanup old code samples and adjust weather sample background / radius with Scaffold component #226
Open
shamalip
wants to merge
13
commits into
android:main
Choose a base branch
from
shamalip:cleanup
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
- "rv" is not recommended and "glance" is the preferred widget framework. - Sizing on those widgets is off. The new canonical layouts are recommended.
- "rv" is not recommended and "glance" is the preferred widget framework. - Sizing on those widgets is off. The new canonical layout contain example of lists and are recommended.
- Glance library's demo directory has code samples for individual components. Here is example of Image widget: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:glance/glance-appwidget/integration-tests/demos/src/main/java/androidx/glance/appwidget/demos/ImageAppWidget.kt;bpv=1
…t samples. The main "AppWidgets" page now displays link to the canonical layout showcase page and then below it, demonstrates the functionality to pin and show widget information.
- 4x2 is the recommended size for such widget - avoid 3x? sizes - Uses glance loading layout resource instead of the local xml - Update the preview image
- To closely match the appWidgetBackground color used in glance.
- The Scaffold component in glance handles the background color, widget radius for you. - For the inner content, calculate widget radius based on the padding and system radius.
+@secondsun I'm deleting old code here and we should recommend the canonical layout samples which are well-designed UX samples. |
…t samples. The main "AppWidgets" page now displays link to the canonical layout showcase page and then below it, demonstrates the functionality to pin and show widget information.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Removes the button and image code samples. For samples of specific Glance components, the Glance demos directory should help (https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:glance/glance-appwidget/integration-tests/demos/)
Adjust the weather sample's size, preview and use Scaffold component as widget container.
NOTE: We don't yet have a similar layout in canonical widget layouts sample (i.e. layout directory), so, keeping the weather widget around until we have a UX designed for such layout.
The weather sample also was updated to calculate inner radius based on system radius and widget's padding (which is 12dp in all layouts and Scaffold).
Additionally, update the AppWidgets entry-point page to call out canonical widget layout samples - which contain recommended UX design for widgets