开发者

When I install my apk I get an icon for every class in the project

开发者 https://www.devze.com 2023-01-19 04:43 出处:网络
I have a project in Eclipse with maybe 7 different classes that i open with Intent.The problem is when I install the .apk on my HTC phone I get an icon for every class.How do I make the project so it

I have a project in Eclipse with maybe 7 different classes that i open with Intent. The problem is when I install the .apk on my HTC phone I get an icon for every class. How do I make the project so it in开发者_运维知识库stalls as one app only? /Johan Andersson


Exactly, as mreichelt said you have to remove this lines from each class declared on your Manifest except from the one you want to be the main Activity :D

    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>   


If you only want one activity to be started from the launcher, just remove the intent filters for all other activities than your wanted one in your manifest. Read more here: http://developer.android.com/guide/topics/fundamentals.html#ifilters

0

精彩评论

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

关注公众号