CameraX Orientation Issue on Fast Rotation

22 views
Skip to first unread message

Ali safwat - علي صفوت

unread,
11:03 AM (10 hours ago) 11:03 AM
to Android CameraX Discussion Group

I’ve encountered an issue while using CameraX related to device orientation handling. When the device is rotated quickly (for example, from portrait to reverse portrait or vice versa), the system successfully detects the orientation change, but the CameraX preview UI does not update accordingly.

I’m using LocalConfiguration to determine the current orientation, and it reflects the correct orientation value after rotation. However, the camera preview UI remains unchanged, which indicates that the CameraX preview or its layout does not refresh properly during rapid rotations.

In my tests:

  • On a Huawei Nova 5T, the orientation is detected and the camera UI updates correctly.

  • On other devices, the issue occurs — the orientation is detected but the camera UI fails to update.

It seems this issue appears mainly during fast rotations, not when rotating the device slowly. Could you please investigate this behavior or provide guidance on ensuring consistent UI updates across devices?

Reply all
Reply to author
Forward
0 new messages