Android Apps Create multiple Shortcuts _android

Source: Internet
Author: User

Sometimes if you want our application to create multiple shortcuts on the desktop, we 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>

Code such as, this is seen from the Pulltorefresh demo, because our general application installation is completed, will only generate a shortcut, but this application generated four, see manifest.xml only found this thing, record ①, may be useful.

Friends who want to help develop Android apps that need this feature.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.