Open mtotschnig opened 7 months ago
Thank you. I'll look into it. I'm not usually using widgets. Your testing seems to show a flaw in my implementation.
@mtotschnig is the debug widget repository private?
@TBog I am sorry. I thought it was public. It is now.
I don't think it's my mistake. Here are the relevant lines
I am reporting the size in dp
. The function UISizes.px2dp
will return pixelSize / metrics.density
Description
My Expenses (https://github.com/mtotschnig/MyExpenses) has widgets that adjust the layout based on the size options reported through getAppWidgetOptions (OPTION_APPWIDGET_MIN_WIDTH and OPTION_APPWIDGET_MAX_WIDTH) This is the result on Pixel Launcher on Android Studio emulator: With TinyBit: I created a sample project with a widget that displays the reported values (https://github.com/mtotschnig/DebugWidget). Pixel Launcher: vs TinyBit:
Context
The documenation for AppWidgetManager.OPTION_APPWIDGET_MIN_WIDTH spezifies that the reported values should be in dips, which is clearly not the case with TinyBit.
Steps to Reproduce
To reproduce the behavior:
Expected behavior
Widget displays min and max width in dips.
Device info