We’ve run into an odd situation with orientation c...
# compose
j
We’ve run into an odd situation with orientation changes on a Galaxy Tab s6 Lite. We have the
android:configChanges
property set in our Activity in our AndroidManifest and one of the values we have in there is orientation. We also utilize
LocalConfiguration.current.orientation
to check the orientation in some places and act accordingly. This works on all of the devices we’ve tested except this Galaxy Tab s6 Lite. For some reason we are always getting ORIENTATION_LANDSCAPE as the value on the current config on that device, unless we remove “orientation” from the conifgChanges list in the manifest. Has anyone seen this before or aware of another option to work around this issue?
👀 3
a
What Android API version are you seeing this behavior on? A screen recording with a simple app outputting value in
LocalConfiguration.current
might also be useful
j
I don’t think you’re referring to these, but just in case here’s what we build the app with: • compileSdk: 33 • minSdk: 26 • targetSdk: 33 I’m pretty sure the Samsung device that had this behavior was on API 30, but I’ll have to double check. It’s a test device that someone on our QA team has and we’re all remote so don’t have it handy.
Ok, talked to the QA person. The device is running Android 12 so API 31.
I’ll work on the video, but that’ll take some coordination.
a
The thing I’d be most curious about is the values of
LocalConfiguration.current.screenWidthDp
and
LocalConfiguration.current.screenHeightDp
and how those relate to
LocalConfiguration.current.orientation
while changing. Having all three of those being output together should be useful for tracking down what’s going on!
j
Ok sure. I’ll throw something together for that. Thanks!