Andorid Canvas Resolution

Monkey Targets Forums/Android/Andorid Canvas Resolution

Virtech(Posted 2011) [#1]
My Android device (see my signature) is capable of an native screen resolution of 480x800. This is the canvas size I would like to use. Also I would prefer to use native screen res for any android phone running my app.

At present target file sets width/height = "fill_parent", but this does not give me native resolution of 480x800. Insted I get 320x533.

Is there any way to set native res on the target device running android?

Since screen res sizes varies between different android phone, ideally Monkey should return the native res for the current phone the app runs on.


BigAnd(Posted 2011) [#2]
Can I just bump this as I would like to know if anyone has a way of setting this correctly or can tell us that it cant be done.

Cheers.

Edit: Found out how to get to the bigger canvas sizes. Add the <supports-screens> section to your Android Manifest.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.monkey"
      android:versionCode="1"
      android:versionName="1.0">
<supports-screens android:resizeable="false"
                  android:smallScreens="false"
                  android:normalScreens="false"
                  android:largeScreens="true"
                  android:anyDensity="true" />
    <application android:label= "@string/app_name" android:icon="@drawable/icon">
        <activity android:name="MonkeyGame"
                  android:label= "@string/app_name"
		android:screenOrientation="landscape"
		android:theme= "@android:style/Theme.NoTitleBar.Fullscreen">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest> 

I had to set the largeScreen and anyDensity to True for it to work, not just the largeScreen.