Skip to content

feat: WidgetSmall redesign non material you#17909

Open
Rdkang wants to merge 6 commits intoankidroid:mainfrom
Rdkang:widget_modern_pre_v31
Open

feat: WidgetSmall redesign non material you#17909
Rdkang wants to merge 6 commits intoankidroid:mainfrom
Rdkang:widget_modern_pre_v31

Conversation

@Rdkang
Copy link
Contributor

@Rdkang Rdkang commented Feb 1, 2025

Purpose / Description

Update small widget design for SDK versions below v31 with the Material You design (using static, not dynamic, colors). This will improve design consistency and simplify the codebase.

Fixes

Approach

Updated the design

  1. Widget with reviews due
  1. Widget when no cards to review, the star on the logo will be darker

How Has This Been Tested?

Virtual pixel 3 on SDK 28 and pixel 7 on SDK 35

Checklist

Please, go through these checks before submitting the PR.

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

@xenonnn4w
Copy link
Contributor

Thanks! Looks awesome. Tested on API 25 and API 28 works fine.
Here the only thing which is quite different was the size of circle_background which depends on the grid layout (was unable to change in these lower api's ) so i don't think it can be fixed. Rest it look awesome again.
image
image

@xenonnn4w
Copy link
Contributor

xenonnn4w commented Feb 2, 2025

Also add the parameters android:previewLayout (for API>31 ) and android:previewImage (for API<=31) in the widget_provider_small file so we can have the same widget looks as you made in the widget picker screen.

@xenonnn4w xenonnn4w added the Needs Author Reply Waiting for a reply from the original author label Feb 2, 2025
@xenonnn4w
Copy link
Contributor

I found that vector files aren't processed for (API<=31), so we have to make a separate drawable file with JPG type most prolly. I'll create a separate issue regarding this for both the widget small and add note. You may ignore my above comment for meanwhile.

@Rdkang
Copy link
Contributor Author

Rdkang commented Feb 15, 2025

Also add the parameters android:previewLayout (for API>31 ) and android:previewImage (for API<=31) in the widget_provider_small file so we can have the same widget looks as you made in the widget picker screen.

Thanks i didn't think about this before, I will implement this now :)

@github-actions

This comment has been minimized.

@github-actions github-actions bot added the Stale label Mar 1, 2025
@Rdkang
Copy link
Contributor Author

Rdkang commented Mar 8, 2025

This pull request is ready for a review (this also fixes a bug in #17654 where it shows two clock icons for the non dynamic widget) :) @david-allison

I'll create a new pull request for the widget picker preview @xenonnn4w

@github-actions github-actions bot removed the Stale label Mar 8, 2025
@xenonnn4w xenonnn4w added Needs Review and removed Needs Author Reply Waiting for a reply from the original author labels Mar 8, 2025
@Arthur-Milchior
Copy link
Member

I admit I don't know this widget, so I don't know what exactly is expected. When are the two numbers expected to be displayed? Could you update the PR description to help the reviewer reproduce and check that the result obtained is similar to the expected result?

Copy link
Member

@Arthur-Milchior Arthur-Milchior left a comment

Choose a reason for hiding this comment

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

Thank you very much for your contributions.

I admit I find thir PR very hard to review. XML is far harder to read than Kotlin, some changes seems to be small details.
I've no idea for example how come we had 4 images that were unused. If this is related to the remaining of your PR, I'd love to understand how it is related. If it's , as it appear, some very old code, then maybe a separate PR would be great, so that your already complex PR would be simpler to review.

If you have time to take a look at git blame and figure out why they were introduced and when they stopped being used it may be interesting. Even if, admittedly, I'm fine if you don't do it, as this seems it has not been used in quite a while. Last commit where I see "widget_bg_number" is 626d334, from 2015!

@Arthur-Milchior
Copy link
Member

Or it seems I get it wrong. The images were used up until your second commit.
Then I'd be fine to remove the file in the 2nd commit, when they cease to be used

@xenonnn4w
Copy link
Contributor

I'll create a new pull request for the widget picker preview

@Rdkang
Did created the issue; and done somewhat except theming :,).

design

The pre-v31 and newer now use the same design apart from using static colors for pre-v31, so this code is now redundant.
Signed-off-by: Rdkang <68774237+Rdkang@users.noreply.github.com>
@Rdkang Rdkang force-pushed the widget_modern_pre_v31 branch from 2fef8c2 to 9249df3 Compare September 10, 2025 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Themed Widgets

3 participants