saynomoo/mig4android — Issue #10: Anroid Canvas etc plays poorly with mig4android
Author: nyholku
Created: 2012-02-06 15:08:43+00:00
State: open

Hi,

while in general mig4android 'Just Works" (tm) there seems to be an issue with
Canvas and family of widgets. It seems that c.getMeasuredHeight() for a Canvas
will return the largest possible size, which then causes havoc in the layout
process.

For my personal needs I just hacked:
```
public final int getMinimumHeight(int sz) {
if (c instanceof OpenGLViewImpl)
return 100;
if (c instanceof Canvas)
return 100;
return c.getMeasuredHeight();
}
```

Not pretty and I'm not suggesting this approach, but saved the day and works
for my situation.

But some way of specifying the minimum size should be devised.

Or maybe there is and I'm just ignorant.

br Kusti