CameraX Orientation Issue on Fast Rotation

53 views
Skip to first unread message

Ali safwat - علي صفوت

unread,
Oct 15, 2025, 11:03:42 AMOct 15
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?

Scott Nien

unread,
Oct 16, 2025, 3:25:26 AMOct 16
to Ali safwat - علي صفوت, Android CameraX Discussion Group
Hi there, 
Are you using PreviewView or CameraXViewFinder or your own implementation to display the camera preview ?  



--
You received this message because you are subscribed to the Google Groups "Android CameraX Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camerax-develop...@android.com.
To view this discussion visit https://groups.google.com/a/android.com/d/msgid/camerax-developers/866854f4-6b4a-41bf-a6dd-172542de6041n%40android.com.

Ali safwat - علي صفوت

unread,
Oct 16, 2025, 4:22:18 AMOct 16
to Scott Nien, Android CameraX Discussion Group
I am using Preview view

Scott Nien

unread,
Oct 17, 2025, 4:25:07 AMOct 17
to Ali safwat - علي صفوت, Android CameraX Discussion Group
Hi , 
This is possible caused by a device issue that display rotation doesn't give correct rotation after DisplayManager.DisplayListener onDisplayChanged is invoked. 

Can you give us the device names that have these issues?  and can you also update the device if possible to see if the issue is resolved ?  


Ali safwat - علي صفوت

unread,
Oct 17, 2025, 5:05:16 AMOct 17
to Scott Nien, Android CameraX Discussion Group
This issue appears on multiple devices, including the Samsung S24 Ultra, Xiaomi Poco F3, and many others. One device on which the problem did not occur is the Huawei Nova 5T

Scott Nien

unread,
Oct 17, 2025, 11:30:31 AMOct 17
to Ali safwat - علي صفوت, Android CameraX Discussion Group
Thanks for confirming it.  I believe it is the same issue. I filed a bug here and we will investigate if we can find solutions to fix it. 


Reply all
Reply to author
Forward
0 new messages