Android System Dialog have strange padding and alignment

I’m using CompanionDeviceManager in Android via a Flutter Method Channel.
When the scanning is complete, a system popup appears, but the UI renders incorrectly.

  • The popup takes up the full width of the screen.
  • It is not centered and has unusual padding.

How can I fix this issue?
What settings should I adjust to ensure the popup aligns correctly?

Do you mind sharing a screenshot? I think Companion Device Pairing popup is specific to each Android version and can vary between manufacturers. When we implemented it we noticed it looks vastly different between Pixel and Samsungs, not to even mention Xiaomi or POCO.

Sure! This is my device screenshow.

Device Info:
device name: Samsung Galaxy S21
version: Android 34

Interesting, I think the search window with companion API just looks like that.

On my Samsung S21 I scan for devices before opening the companion API pairing popup and it looks slightly differently, although the padding is quite big too. Perhaps Samsung just never tested how this window looks like. I don’t remember a way to customize it.

Thank for sharing your experience!
I think the UX will not be good for use in a product, so I should share it as a Flutter GitHub issue.

I think the native popup look is not related to Flutter. This is just how it looks like on some Android phones (see how it looks like on vanilla AOSP Android Sincronización de dispositivos complementarios  |  Connectivity  |  Android Developers)

I notice that it is Samsung One UI problem. I shared issue on samsung developer service center.
There is no way fixed myself.