Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

For #9323 - Use android:background to set small search widget microphone icon #27410

Merged
merged 2 commits into from
Oct 21, 2022

Conversation

Alexandru2909
Copy link
Contributor

@Alexandru2909 Alexandru2909 commented Oct 14, 2022

Updated the small widget layout to use android:background instead of app:srcCompat to properly display the microphone icon.

small medium large
small medium large

Pull Request checklist

  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Screenshots: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not
  • Accessibility: The code in this PR follows accessibility best practices or does not include any user facing features. In addition, it includes a screenshot of a successful accessibility scan to ensure no new defects are added to the product.

QA

  • QA Needed

To download an APK when reviewing a PR (after all CI tasks finished running):

  1. Click on Checks at the top of the PR page.
  2. Click on the firefoxci-taskcluster group on the left to expand all tasks.
  3. Click on the build-debug task.
  4. Click on View task in Taskcluster in the new DETAILS section.
  5. The APK links should be on the right side of the screen, named for each CPU architecture.

GitHub Automation

Fixes #9323

@Alexandru2909 Alexandru2909 requested review from a team as code owners October 14, 2022 12:22
@MozillaNoah
Copy link
Contributor

The solution here looks straightforward. Did you happen to figure out why changing the asset initialization from android:src/app:srcCompat to android:background fixed this?

@Alexandru2909
Copy link
Contributor Author

The solution here looks straightforward. Did you happen to figure out why changing the asset initialization from android:src/app:srcCompat to android:background fixed this?

Using android:background was actually inspired from the AC code. While working on this I observed using android:src also works fine for this problem, so this may just be a compatibility issue between the widget provider and AppCompatImageView.

@MozillaNoah
Copy link
Contributor

The solution here looks straightforward. Did you happen to figure out why changing the asset initialization from android:src/app:srcCompat to android:background fixed this?

Using android:background was actually inspired from the AC code. While working on this I observed using android:src also works fine for this problem, so this may just be a compatibility issue between the widget provider and AppCompatImageView.

Gotcha gotcha. This has me curious, long term, how Compose + Widgets will interact.

:shipit:

@Alexandru2909 Alexandru2909 added the pr:needs-landing PRs that are ready to land [Will be merged by Mergify] label Oct 21, 2022
@mergify mergify bot merged commit dbc05b4 into mozilla-mobile:main Oct 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr:needs-landing PRs that are ready to land [Will be merged by Mergify]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]The microphone icon for widget is not displayed on 2x1 size
2 participants