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

Add sample layouts for toolbar style widgets #216

Merged
merged 4 commits into from
Dec 5, 2024
Merged

Conversation

shamalip
Copy link
Contributor

@shamalip shamalip commented Dec 2, 2024

Contains two flavors of responsive toolbar layouts:

  1. Search toolbar: Focuses on presenting a prominent search entry point along with 4 additional buttons for other frequently used actions. Drops as a 2x2 where search bar is on the top and buttons below it.
  2. Toolbar with app header: Presents an app brand logo, a header icon for most frequently used action, and 4 other frequently used actions. Drops as 4x1 toolbar showing all items in a row.

These layouts use Glance's scaffold component that allows us to

  1. Fill bounds
  2. Use system defined widget corner radius
  3. mark our background with id/background to help with animations

The buttons fill the available space as well - which along with breakpoints enable us to use the widget space efficiently.

CL also includes glance android studio previews at the defined breakpoints.

7VrzbqqpRWMb9NJ 67Ja94XJYp77z8R

Used by Toolbar w/ header and Search Toolbar layouts
… 4 secondary entry points.

It is a variant of search toolbar but with a title bar or its components.
@shamalip
Copy link
Contributor Author

shamalip commented Dec 4, 2024

+@ashnohe for repo approval

Copy link
Contributor

@yrezgui yrezgui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @shamalip! The screenshots are nice and the codebase well explained.

@yrezgui yrezgui merged commit 7efe17b into android:main Dec 5, 2024
2 checks passed
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.

3 participants