I am the developer of an app that relies on getting accurate pixel dimensions for its widget, so that it can render a bitmap that will fit exactly inside it... for both portraitandlandscape home screen orientations.
But in MS Launcher the pixel dimensions being reported don't match the actual widget bounds... by quite some way.
I've created asample appto demonstrate this. After installation:
(1) orient phone in portrait orientation
(2) place a widget on the home screen... just hit ADD WIDGET in the config activity without changing anything
(3) hit UPDATE on the widget to draw a green bitmap that should (in theory) fill the widget bounds perfectly
(4) now rotate the home screen to landscape orientation (if this is possible in MS Launcher?)
(5) hit UPDATE on the widget to redraw the green bitmap
On my device the green bitmap does not fill the widget very well... see screenshot below. The screenshot shows blue-coloured gaps top and bottom... the green bitmap doesn't fit the widget outline... nowhere near.
The key function in the code to get the widget dimensions is MyAppWidget.getWidgetDimensionsInDp(). The method used to get the widget dimensions is referenced in there. My understanding is that the method is not entirely "official", but this method does work well in the majority of other launchers.
It would be great if this could be fixed in MS Launcher, so that the AppWidgetManager.OPTION_APPWIDGET_MIN_WIDTH etc values properly reflect the actual widget dimensions... for both landscape and portrait home screen orientations.