When I install my apk I get an icon for every class in the project
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
精彩评论