开发者

Where should i add <supports-screens> in Android tiapp.xml

[WARN] For your density-specific images

(android/images/high|medium|low|res-*) to be effective, you should put a element with anyDensity="true" in the section of your tiapp.xml or in a custom AndroidManifest.xml

I get this warning in my emulator. Now where do i add <supports-screens> in my tiapp.xml

<?xml version="1.0" encoding="UTF-8"?>
<ti:app
xmlns:ti="http://ti.appcelerator.org">
<id>com.gfg.gfgfg</id>
<name>fgfgfgf</name>
<version>1.0</version>
<publisher>uuuu</publisher>
<url>http://www.uuu.com</url>开发者_JS百科
<description>No description
provided</description> <copyright>2011
by John</copyright>
<icon>default_app_logo.png</icon>
    <persistent-wifi>false</persistent-wifi>
    <prerendered-icon>false</prerendered-icon>
    <statusbar-style>default</statusbar-style>
    <statusbar-hidden>false</statusbar-hidden>
    <fullscreen>false</fullscreen>
    <navbar-hidden>false</navbar-hidden>
    <analytics>true</analytics> 
    <guid>cba0a3f5-1d77-4cb2-bac0-4fb27109f48b</guid>
    <iphone>        
        <orientations device="iphone">
          <orientation>Ti.UI.PORTRAIT</orientation>
        </orientations>         
        <orientations device="ipad">
            <orientation>Ti.UI.PORTRAIT</orientation>
            <orientation>Ti.UI.UPSIDE_PORTRAIT</orientation>
            <orientation>Ti.UI.LANDSCAPE_LEFT</orientation>
            <orientation>Ti.UI.LANDSCAPE_RIGHT</orientation>
        </orientations> 
    </iphone>   
    <android xmlns:android="http://schemas.android.com/apk/res/android">
    </android>
    <modules></modules>
</ti:app>


Im not sure what file you are showing but the supports-screens value is set using the manifest file; which (I believe) needs to be called AndroidManifest.xml.

Here is the full details: http://developer.android.com/guide/topics/manifest/supports-screens-element.html

A manifest file usually looks like this:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="dsfdsfds.dasdsa"
      android:versionCode="1"
      android:versionName="1.0">
    <uses-sdk android:minSdkVersion="8" />

    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".dsfdsfds"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

    <supports-screens android:anyDensity="true" />

</manifest>

And <supports-screens> can be put anywhere inside <manifest>

Can someone back me up here though; does the posters XML look like a manifest file for android?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜