Android NTP background images are the wrong aspect ratio #28450
Labels
feature/new-tab
OS/Android
Fixes related to Android browser functionality
QA Pass - Android ARM
QA/Yes
release-notes/include
Milestone
There have been a few reports that NTP images, both sponsored and regular, are being stretched. In portrait mode, that appears to usually make the image wider than it should be.
What we have found out:
The issue seems to be caused by creating an image that is the device width and height, but setting it directly on the
FrameLayout
. The bug was possibly caused in brave/brave-core#13951 because previous to that, the image was being set on a scroll view.However, it seems that possibly because of the refactor in brave/brave-core#13951 we don't even need to be using the code path involving Glide and the FrameLayout at all:
Bypassing the code that calls
BraveActivity.getBraveActivity().setBackground(bgWallpaper);
fixes the issue and doesn't seem to cause any bugs scrolling down to Brave News. So perhaps that code path was only needed when the scroll view was used.Test Plan
TBD - something that measures the "squareness" or the aspect ratio of something identifiable on one of the bg images.
Maybe we can coordinate a test using
--use-dev-goupdater-url
in Slack in the #ntp-sponsored-image channel? (employee only)The text was updated successfully, but these errors were encountered: