Generate Desktop shortcuts and Activity shortcuts for activity
Sometimes, if you want your application to create multiple shortcuts on the desktop, you can declare the corresponding activity in the Manifest. xml file.
<application android:icon="@drawable/icon" android:label="@string/app_name" android:theme="@android:style/Theme.Light" > <activity android:name=".PullToRefreshListActivity" android:label="PtR ListView" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name=".PullToRefreshGridActivity" android:label="PtR GridView" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name=".PullToRefreshExpandableListActivity" android:label="PtR ExpandableListView" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name=".PullToRefreshWebViewActivity" android:label="PtR WebView" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application>
The code above is shown in the demo of PullToRefresh, because after the general application is installed, only one shortcut is generated, but four shortcuts are generated for this application, manifest. xml only discovers this thing. It may be useful to record 1.