1
General discussions / Re: Android and iOS ports available for testing
« on: March 10, 2014, 04:53:04 pm »
I'd just like to report a bug with the onContentChange method on MainAndroid.cpp
Around lines 318-319:
You're getting the size incorrectly. In certain devices, such as Amazon's Kindle Fire, the window is moved up and resized by the action bar, causing it to e.g., change the size from 1024 height to 1004 height. In this case, however, ANativeWindow will get the old value (1024) while the Rect parameter passed to onContentChange has the right value (1004).
I replaced these lines with the following:
Around lines 318-319:
event.size.width = ANativeWindow_getWidth(states->window);
event.size.height = ANativeWindow_getHeight(states->window);
event.size.height = ANativeWindow_getHeight(states->window);
You're getting the size incorrectly. In certain devices, such as Amazon's Kindle Fire, the window is moved up and resized by the action bar, causing it to e.g., change the size from 1024 height to 1004 height. In this case, however, ANativeWindow will get the old value (1024) while the Rect parameter passed to onContentChange has the right value (1004).
I replaced these lines with the following:
event.size.width = rect->right;
event.size.height = rect->bottom;
event.size.height = rect->bottom;