开发者

How to set launcher application icon on Android Cellphone with 1.5 api

I Im working with a Motorola DEXT with a 1.5 api, and the application launcher icon it's not shown. When I use an emulator with a 1.6 or newer api it works just fine. Is there any addit开发者_StackOverflow中文版ional steps to configure the icon for older apis like the 1.5 I'm working on?

Thank you very much


Sorry for the late reply. You need the intent-filter shown below in the activity you want the launcher to launch:

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


Check which resource directory your drawable/icon is in.

Android 1.5 doesn't support multiple screen dpi resolutions. Android 1.5 only looks for application icons in the resource directory res/drawable.

If you are seeing the icon in 1.6, but not 1.5, my guess is that you have the icon in a resolution-specific directory, such as res/drawable-mdpi. Try making a second copy of the icon in res/drawable/icon.png.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜