I'm creating an Android Cardboard app from scratch. The CardboardView is rendered in the wrong size. This happens both on the emulator, which emulates a Galaxy Nexus Kitkat, and on a real device, a Galaxy K Zoom.
In the LogCat, I get the following message (for the emulator):
E/CardboardViewNativeImpl: Surface size 656x872 does not match the expected screen size 1280x720. Stereo rendering might feel off.
In the layout, I'm using:
android:layout_width="fill_parent"
android:layout_height="fill_parent"
I also have a res\layout\dimens.xml
that has the same contents as the res\layout\dimens.xml
in the Treasure Hunt sample app.
I've found that the application takes the screen size from the device, and that some devices report their screen size wrongly.
However, the "Treasure Hunt" demo app works correctly on both the emulated and the real device.
Neither of the devices is rooted.
The problem is also mentioned on here and here, but not solved on either of these sites. I also get some links from a site named quabr.com, but if they had the answer once it is no longer there.
The problem as it appears in the emulator: