Landscape Problem
Monkey Targets Forums/Android/Landscape Problem
| ||
Hey guys, I have just released my new game and now there is a problem and I donīt know why. Fryman reports that the game running in landscape mode, but it is cut at the half of the screen. See here: [img ![]() My AndroidMainifest.xml: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.yorkburkhardt.roccosblocklandfree" android:versionCode="2" android:versionName="1.1" android:installLocation="auto"> <uses-sdk android:minSdkVersion="3" android:targetSdkVersion="7" /> <uses-feature android:glEsVersion="0x00010001" /> <application android:label="Roccos Block Land Free" android:icon="@drawable/icon"> <activity android:name="MonkeyGame" android:label="Roccos Block Land Free" android:screenOrientation="landscape" android:configChanges="keyboardHidden|orientation" android:theme=\"@...; <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/> </application> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> </manifest> On my Huawei, and a Samsung Galaxy S2 there are no problems with it.?? hmm :( So, can anybody help me? |
| ||
ive recently had this problem.i the game running in 640x480.The problem was because i hadnt got the scale set up correctly .eg Global WIDTH:Float = 640 Global HEIGHT:Float = 480 Global SCREEN_WIDTH:Int Global SCREEN_HEIGHT:Int Method OnCreate:Int() SCREEN_WIDTH = DeviceWidth() SCREEN_HEIGHT = DeviceHeight() end Method OnRender:Int() Scale SCREEN_WIDTH / WIDTH, SCREEN_HEIGHT / HEIGHT PushMatrix 'DRAW STUFF HERE PopMatrix END i know im prob showing you how to suck eggs here but its always been that problem when its happened to me |
| ||
Hey thanks for your answer. But thatīs the way I do. If I run it in html5 it scales up correctly. On my Galaxy S2 there is also no problem with the scale.. |
| ||
ive just downloaded on my phone which is an experia x10 and the screen is fine on that.i also tested it a galaxy tab 7" and that works great as well. |
| ||
Thank you for trying =) But it is very curios.. Thatīs why I like iOS more than Android. On iOS we havenīt so many different devices. But I donīt understand this problem. Perhaps the Htc One X ( where the prob appears ) need more information in the manifest file.. ? |
| ||
I tested the game on my samsung galaxy s2 and at first install it happened that and then crashed. After opening it again it worked great. |
| ||
No problems on Galaxy Tab here too. |
| ||
Ok on my s2 as well. How about playing around with different resolutions in the blue stacks emulator, to see if you cn encourage the bug to surface consistently? |
| ||
What does your main.xml look like? |
| ||
Hey, my main.xml looks like this: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal" > <view class="${ANDROID_APP_PACKAGE}.MonkeyGame$MonkeyView" android:id="@+id/monkeyview" android:keepScreenOn="true" android:layout_width="fill_parent" android:layout_height="fill_parent" /> </LinearLayout> |
| ||
So the problem seems to be cleared: "the orientation works fine now ive switched roms, must of been my phone" Thank you to all, who have tested it and helped me =) |
| ||
It just dawned on me..... have you tried changing your minSdkVersion in the Manifest to at least 8 instead of 3? It's set to 3 right now, which can be really problematic. I think that supports Android 1.5, but I can't get Monkey games to work on 1.5 anyway, so I up the minSdkVersion to 8 (Android 2.2) and then targetSdkVersion to 15. I used to have this problem with my Java games where the jump from minSdk 3 to 4 made a huge difference in how the layout was handled. |
| ||
Hey benmc, i will just try it with the next update. Perhaps this is the way I can solve some trouble. Thank you for this tip. |
| ||
The only problem may be that anyone with an SDK below 8 may not be able to get the update or download since it's already out there with 3. It could result in some negative feedback if current customers can't get the update. Hopefully it was just a ROM and you can leave it at 3. |