I have developed a re-sizable app-widget for tablets. The app-widget works nice on most devices with the majority of launchers, however there are some problems with the orientation especially on the GO-HD Launcher in portrait mode. The height of the app-widget is too big and doesn't look nice.
In order to deal with this I have created a method to allow the user to set any extra margins, in the app-widget space, he wants to make it look nice. For example he can set extra 20 pixels top margin when the device is in portrait mode and only 5 pixels when in landscape etc.
Now I am creating an activity to allow users to set the margins. I want to make a small preview area (it will be a linear layout with the same background drawable app-widget has) in order for the user to get an idea of how the app-widget will look like on the home screen with these margins. Actually I have done that but the result is far away from the reality.
So my question is:
Is there any way to get the size (or close to it) of the grid cell that launcher application using to place the app-widgets on the home screen? Please note that I am aware of the fact that not all launchers following the Android formulas for this but what I want is to get a way to calculate an approximation of it.
---- EDIT ----
In order to better understand my problem I have created a screenshot:
First of all the app-widget's background is a shape xml file with no graphics or dimensions at all. It's up to Android to draw it in the available space. In my opinion this is the best GUI design (at least with the background). Now in the screen 1 you can see the widget in portrait mode in the default Android launcher, it looks very nice and it is re-sizing OK. In screen 2 and 3 you can see it in GO-HD launcher (landscape and portrait mode), in this launcher it looks pretty small in landscape mode and very big in portrait mode. I can fix this problem by letting the user adjust the margins as you can see in screen 4.
If you compare the preview (the dark area in the center of screen 4) with the original app-widget in android's default launcher you can see that there is no a good match. What I am asking is how can I present to the user a better preview (closest to the actual app-widget).
Thank you and please forgive my English