Sergio
Sergio

Reputation: 461

Problem with multiple size widgets in Android One devices

Multiple widgets sizes are working fine in every device except for two Xiaomi devices, an Mia1 and Mia2, where only the small widget appears as selectable. As I said before works fine in 3 other devices where the app was tested (2 huaweis and 1 samsung). The widget is properly coded before someone asks (the receivers declared in manifest, different providers for each size, etc).

Could this be not an specific Xiaomi problem and more an Android One one? Has anyone encountered any similar problem?

Thanks in advance.

Upvotes: 0

Views: 257

Answers (1)

Sergio
Sergio

Reputation: 461

Ok, so I found the solution. Problem was not the device or its Android version, I was giving to the widget's minWidth a very high value in order to adapt it to any device full width, like tablets (500dp in this case).

So this devices (Mia2 is 5 colums width, 320dp), with lower maxWidth than 500dp were directly ignoring the bigger widget. It's pretty extrange because the Huawei(p30 lite) is 4 columns witdh and the widget was working with any minWidth dps.

It may depends on the device, but my suggestion is to give the widget a specific size and then let the user decide the full widget's size with the resizeMode option.

Upvotes: 1

Related Questions