I've programmed Android for a while, but this really puzzles me.
So I have a simple appwidget with a textview. I simply want the text font size inside that textview to scale up/down if the user resizes the widget so as to make the text larger if the app is resized. I have tried several solutions but everything fails:
Simply using the "sp" (scaled pixels) unit for the font size - this does not scale the text when widget size changes (I did not expect it too as well!).
Extending TextView with my own and the overriding onSizeChanged method. But you cannot have descendents of basic UI classes in a widget (documentation also states this).
Since there are no methods to even get the current appWidget size I simply am stuck here.
Yes, I know one solution is to create different versions of the widget like 1x4 and 2x4 etc, but surely there is another way?
Any ideas are welcome?