Reference article: http://401389373.qzone.qq.com /#!
Keywords: Android desktop shortcut plug-in
Platform: s5pc110 s5pv210
System: android2.3 android2.3.4
1. Mainly changed the file android2.3.4 _ gb_t34h \ packages \ apps \ launcher2 \ res \ XML \ default_workspace.xml
Code Description:
Now you can modify the file. You can add and delete shortcuts and plug-ins here. Three types are introduced: Google-defined plug-ins, Program Shortcuts, and program plug-ins, A brief description:
Shortcuts
<Favorite // program shortcut
Launcher: classname = "com. Android. Camera. Camera" // class of the application
Launcher: packagename = "com. Android. Camera"
// Package name of the application
Launcher: screen = "2" // 3rd screen, 0-4 screen, 5 screens in total
Launcher: x = "3" // icon X position. The first one in the upper left corner is 0, incrementing to the left. There are 6 in the 0-5.
Launcher: Y = "3" type = "codeph" text = "codeph"/> // The y position of the icon. The first one in the upper left corner is 0, increasing downward. There are 3 in total 0-2.
Plugin description
<Appwidget // plug-in
Launcher: classname = "com. Android. Music. mediaappwidgetprovider" // class of the application
Launcher: packagename = "com. Android. Music" // package name of the application
Launcher: screen = "4" // 5th screen, 0-4 screen, 5 screens in total
Launcher: x = "2" // icon X position. The first one in the upper left corner is 0, incrementing to the left. There are 6 in the 0-5.
Launcher: Y = "1" // icon y position. The first one in the upper left corner is 0, which increments downward. There are 3 in total 0-2.
Launcher: Spanx = "2" // number of cells in the X direction
Launcher: spany = "1"/> // number of cells in the Y direction
The package name and class of the application to be created must be cracked by the corresponding APK. (Not in the scope of this article, please google if necessary)
<Search // search bar
Launcher: screen = "1" // screen 2nd
Launcher: x = "0" // icon X position
Launcher: Y = "1"/> // icon y position
Google has configured plug-ins such as search and clock by default, so you only need to specify the screen number and X and Y coordinates.
The following code adds four shortcuts: Clock, calendar, gallery, and camera.
<favorite launcher:className="com.android.camera.Camera" launcher:packageName="com.android.camera" launcher:screen="2" launcher:x="3" launcher:y="3" /> <favorite launcher:className="com.android.calendar.LaunchActivity" launcher:packageName="com.android.calendar" launcher:screen="2" launcher:x="1" launcher:y="3" /> <favorite launcher:className="com.cooliris.media.Gallery" launcher:packageName="com.cooliris.media" launcher:screen="2" launcher:x="2" launcher:y="3" /><favorite launcher:className="com.android.deskclock.DeskClock" launcher:packageName="com.android.deskclock" launcher:screen="2" launcher:x="0" launcher:y="3" />
The effects of the changes are as follows: