When there are multiple launcher desktops in the system, the default launcher can be set in the following ways:Method One:Lazy words, will not want to launcher, such as Launcher3 Androidmanifest.xml file in the home attribute removed, only to retain their own launcher can, if we have other launcher source. The disadvantage is that the home attribute is removed and cannot be entered.Method Two:1. Edit:Frameworks/base/services/java/com/android/server/pm
In android, how does one change the main menu icon to the installation time?1. Add the following code to LauncherModel. java. If it is KK Launcher3 ApplicationInfo, replace it with AppInfo.Public static final Comparator Return new Comparator Public final int compare (ApplicationInfo a, ApplicationInfo B ){Return a. firstInstallTime = B. firstInstallTime? 0: a. firstInstallTime> B. firstInstallTime? 1:-1;}};}Public static class InstallTimeComparator im
AIO-3288C Android8.1 firmware has been released!"Firmware Update"1. Support HDMI audio output2. Support ap6212/ap6236 WiFi bluetooth module3. Support Camera OV138504. Support Ethernet5, Support ES83236, Support RS2327. IR IR Remote control support8. Modify LAUNCHER3 display mode9, added the left mouse button click Support, the right mouse button is always set as the return key10. Fixed the problem that the all apps interface can't use remote control11
See the number on the iphone calendar icon will change with the date changes, recently on the Android platform also studied, the implementation method is as follows:directly on the sourceChanged it in the launcher.First, in the Iconcache.java file, find the method private CacheEntry cachelocked (componentname componentname, ResolveInfo info,HashmapIn Entry.icon = Utilities.createiconbitmap (icon, mcontext); This position is modified:The following source code is changed:Next Modify Utilities.java
: title = "@ string/jinshan_title"
Launcher: screen = ""
Launcher: x = ""
Launcher: y = ""/>
Launcher: packageName = "com. android. settings"
Launcher: className = "com. android. settings. widget. SettingsAppWidgetProvider"
Launcher: screen = "3"
Launcher: x = "0"
Launcher: y = "0"
Launcher: spanX = "4" // Number of grids in the x direction on the screen
Launcher: spanY = "1" // Number of grids in the y direction on the screen/>
Note:
1. conf
package name to modify), which is not only a reference to the class, there are also many references in xml files (such as import com. android. launcher3.R;), all of which can be done at one time as long as the rename is good.
Enter your own package name for New name, and select all the following four items. Click "Preview"
Note: It is best not to place your project in the Chinese path. Otherwise, an error will occur during rename. I started to put t
1. Add the following code to the Launchermodel.java, if the KK Launcher3 applicationinfo to be replaced with the appinfopublic static final comparatorreturn new comparatorPublic final int Compare (ApplicationInfo A, applicationinfo b) {return a.firstinstalltime = = B.firstinstalltime? 0:a.firstinstalltime > B.firstinstalltime? 1:-1;}};}public static class Installtimecomparator implements ComparatorPrivate Packagemanager Mpackagemanager;ListInstalltime
1. Add the following code in launchermodel.java, assuming the KK Launcher3 applicationinfo to be replaced with the appinfopublic static final comparatorreturn new comparatorPublic final int Compare (applicationinfo a, applicationinfo B) {return A.firstinstalltime = = b.firstinstalltime? 0:a.firstinstalltime > b.firstinstalltime? 1:-1;}};}public static class Installtimecomparator implements ComparatorPrivate Packagemanager mpackagemanager;ListInstallti
the main menu interface.
Add a property Android: singleline = "true" to the property of the bubbletextview class"
The pictures and names of the android Main Menu are all implemented using a bubbletextview class, so you only need to change it in this class. Launcher3 uses apps_mimize_application.xml to control the textview attribute. The class file used is pagedviewicon. java.
Xmlns: Android = "http://schemas.android.com/apk/res/android"
Xmlns: laun
. Settings"
Launcher: classname = "com. Android. settings. widget. settingsappwidgetprovider"
Launcher: screen = "3"
Launcher: x = "0"
Launcher: Y = "0"
Launcher: Spanx = "4" // Number of grids in the X direction on the screen
Launcher: spany = "1" // Number of grids in the Y direction on the screen/>
Note:
1. Configuration appwidget cannot be preset.
2. The app widget cannot be preset in The KK version launcher3 (default Google design)
3. If it is a
This series of articles will start the android lancher source code analysis. The example is the launcher3 source code that comes with Android 2.3. Its: http://download.csdn.net/detail/xianming01/4383598
This is the first article to introduce lancher's UI layout.
1. Layout
Run the APK and the execution result is:
After pressing the Home key:
2. layout files
Let's take a look at the layout file launcher. xml of lancher. Its source code is:
3. layout
third line is incomplete when three lines are marked on the main menu interface.
Add a property android: singleLine = "true" to the property of the BubbleTextView class"
The pictures and names of the android Main Menu are all implemented using a BubbleTextView class, so you only need to change it in this class. Launcher3 uses apps_mimize_application.xml to control the textview attribute. The class file used is PagedViewIcon. java.
Xmlns: android =
executing the make command. Compile the entire Android source code.
Mm: if it is executed in the root directory of the Android source code, it is equivalent to executing the make command to compile the entire source code. If it is executed in a sub-directory under the root directory of the Android source code, it will start from this sub-directory and go up to a directory until the root directory to find whether there is an Android. mk file. If so, compile the modules described in the Android.
; OKRemember to select user systemlibrary during adding3. Modify launcher2PackageName, because the package is the same com. Android. launcher but the digital signature is different, the system will refuse to install
Change the name of the original package. Remember to use the eclipse rename mechanism (Press F2 on the package name to modify), which is not only a reference to the class, there are also many references in XML files (such as import COM. android.
1. Add the following code in Launchermodel.java, assuming the KK Launcher3 applicationinfo to be replaced with the appinfopublic static final comparatorreturn new comparatorPublic final int Compare (ApplicationInfo A, applicationinfo b) {return a.firstinstalltime = = B.firstinstalltime?0:a.firstinstalltime > B.firstinstalltime? 1:-1;}};}public static class Installtimecomparator implements ComparatorPrivate Packagemanager Mpackagemanager;ListInstalltim
interaction points.
You can also see from the sequence diagram that the call chain is quite long, the corresponding amount of code is also relatively large, and the sequence diagram is only the analysis of the process in this scenario. The road is long, and the line will come!
3.1 Launcher respond to user clicks, notify AMS
Launcher as an application of the entrance, or it is necessary to explain, we look at the Launcher code fragment, launcher use is the Packages/apps/
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.