dji-sdk / Mobile-UXSDK-Beta-Android

Mobile Android UXSDK Beta
MIT License
97 stars 55 forks source link

Battery widget not scaling text size properly #43

Closed ljustice-riis closed 3 years ago

ljustice-riis commented 3 years ago

When trying to use a text size in sp for xml attribute uxsdk_singlePercentTextSize or uxsdk_dualPercentTextSize, the font size is much larger than anticipated. It seems to be because DisplayUtil.pxToSp(context, it) is missing in initAttributes() in BatteryWidget.kt when setting the text size.

This behavior is inconsistent with similar widgets like FlightModeWidget