x/mobile: Window always 800x800px #15737
Closed
Labels
Comments
By viewport, I assume you're referring to the actual window size. Sending a |
Is there a reason it's hard coded, or is this a good candidate for a patch? I'm interested in developing with GoMobile, but without having a way to adjust the window size to fit common device sizes makes testing difficult. |
Note that we generally do not use the issue tracker for discussions. See https://golang.org/wiki/Questions . |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I can't seem to resize the viewport with gomobile. It's cumbersome to manually drag the corner of the viewport to match the screen size of an iPhone, so I'm hoping to do it programmatically, but the events seem to be getting overruled.
I ran
gomobile build
and executed the binary and expected to see a viewport 400px wide by 800px tall. Instead, I always get the default 800x800px viewport. I do not have a device plugged in. Debugging the Events() channel, it looks like 3 Size Events are automatically run after my Size event is processed:I also tried setting the viewport using the Viewport() function from https://godoc.org/golang.org/x/mobile/gl#Context, but that did not work either. It appears that an 800x800px viewport is somehow registered into the startup process and there doesn't appear to be an easy way to change that, or am I missing something?
The text was updated successfully, but these errors were encountered: