Status Update
Comments
di...@google.com <di...@google.com>
ke...@google.com <ke...@google.com> #2
This is working as expected, since the accessibility settings raise the value returned through resources.displayMetrics.density. The width and height of the display in dp's has been lowered and therefore the display is now in the Compact size class.
The values returned from getMaximumWindowMetrics
should return the values without any scaling involved, and may be the right calculation you want to use if you want to disregard any scaling from settings.
di...@google.com <di...@google.com> #3
Hi Mariia, do you have any additional thoughts here?
ma...@google.com <ma...@google.com> #4
Agree with what Ken has said.
Hi Rob, do you think guidance might need to be updated to take the flagged scenario into account?
ro...@google.com <ro...@google.com> #5
Yes, we definitely need to update the guidance to reflect the current scenario.
ro...@google.com <ro...@google.com> #6
I cannot reproduce the scenario on my Pixel Fold, I could only get as low as MEDIUM. Could you share a video on how to setup the Pixel Fold to see the issue, please?
ca...@sap.com <ca...@sap.com> #7
I added a screenshot of the "settings" -> "accessibility" -> "display size and text" screen of my Pixel Fold emulator (API 34). All device settings are factory default, except the display size that was set to maximum, the font size was not touched. When the device is unfolded and in "landscape" (front camera being top right) I get width and height COMPACT, when I rotate the device to "portrait" remaining in unfolded state I get width COMPACT and height MEDIUM leading as well to boolean return-value "true" of isDeviceScreenCompact().
ca...@sap.com <ca...@sap.com> #8
Any updates here?
Description
Component used: androidx.window:window and androidx.window:window-core
Version used: 1.3.0-rc01
Devices/Android versions reproduced on: Pixel Fold
Based on following recommendation from the large screen cookbook we are restricting the device screen orientation to PORTRAIT as soon as either the device window height or width is compact, otherwise we set the orientation to FULL_USER.
Once the display size is set to maximum in the accessibility settings, the code snippet provided by the cookbook returns that the device has a compact screen because both, width and height, are compact. This leads to the issue that the app gets letterboxed in the unfolded state as it will get restricted to portrait.