Android Metro-style Launcher development series 1, androidmetro
It has been more than three years since graduation. I recall that I have never written a blog in the past three years. I always feel busy and have no time to write. I also feel that writing a blog is useless. However, I can see that many of my colleagues are writing blogs and sharing their own things. So I started to write a series of articles
initialized to define the screen direction in celllayoutLauncher app: \ cupcake \ packages \ apps \ LauncherThe standby screen is divided into multiple layers. The desktop items is set in \ res \ Layout-* \ workspace_screen.xml:......Launcher: shortaxiscells = "4"Launcher: longaxiscells = "4"....../>4 rows and 4 columnsLet's take a look at com. Android.
I believe that the Android system has seen the classic launcher. As shown in, it is the original launcher Main Menu function of 4.0. What we want to learn today is this. Through this small code, we can review the knowledge points:
①. Application acquisition and processing, including applications in SD.
②. Dynamically m
Launcher Start-up processReference: http://blog.csdn.net/fengkehuan/article/details/6205980From the network to find a section on the launcher of the starting process of the article, as a background knowledge of learning launcher:linuxkernel start will be through a process to initialize Androidruntimejava operating environment, while android. All
Preface:dear friends, please forgive me for so long to start writing this series of the second blog, no way to busy new product release, good nonsense not to say, first review: In my previous blog Android The Metro Style Launcher Development Series first wrote how to configure the Android development environment, just to show the preliminary design and product r
Packagemanagerservice. See later ):
Each apk file is an archive file, which contains the android application configuration file Androidmanifest.xml, which is mainly to resolve this configuration file. Once the profile is obtained from the APK archive, the application is parsed by calling another external version of the Parsepackage function: parsing the individual tags in the androidmanifest.xml file , such as the parsing of application tags, this
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
(11) Android Launcher customization: 4.4 latest desktop single-layer, dual-layer switch function, androidlauncher
Recently, it took a few nights to import the latest 4.4 desktop to eclipse and fixed some errors. It can finally run.
It is found that the single screen code on 4.4luancher has changed.
Find it and configure it in LauncherAppState.
You can achieve single-or double-layer switching.
Public st
. Intent. Category. launcher do not need to be added to the filter of Android. Intent. Category. Default. Of course, it is no problem to add the filter.
If the defined activity accepts implicit intent, the android. Intent. Category. Default category must be added to intent filer.
Android. Intent. Category. LauncherW
I. Preface:Init process –> zygote process –> systemserver process –> Launcher Desktop program-our appInit process: Linux root process, Android system is based on Linux system, so it can be counted as the first process of the entire Android operating system;Zygote process: Root process of Android system, main function:
How does android modify the built-in apk icon and androidapk in launcher?
Find the variable in IconCache under launcher to store the package name and icon to be modified to apk.
Private String [] className = {"com. google. android. apps. maps", "com. google. android. googleq
After reading the code above, we can see that when we start to click the desktop, celllayout will check whether there is a child in the selected area based on the clicked area. If so, we can set it as a tag. cell, no, Tag. cell is set to null, and launcher is later started when drag and drop. onlongclick processes tags,
This straighten out, and then go deep into the workspace. startdrag function. workspace. startdrag calls dragcontroller. startdrag to
Elastic cut (1) for Android-Launcher development)
The following source code is from Launcher2.3.
1. By default, the main Activity of each application comes
Indicates that when the application is installed to Launcher, click to open the Activity
2. the time sequence diagram of Launcher2 source code is as follows: (in the figure, we can see that two items n
shortcut. * @param parent The group the shortcut belongs to. * @param info The data structure describing the shortcut. * * @return A View inflated from layoutResId. */ View createShortcut(int layoutResId, ViewGroup parent, ShortcutInfo info) { TextView favorite = (TextView) mInflater.inflate(layoutResId, parent, false); favorite.setCompoundDrawablesWithIntrinsicBounds(null, new FastBitmapDrawable(info.getIcon(mIconCache)), null,
true;
We can see that there is cellinfo = (cellinfo) V in onlongclick. gettag (); in this way, we know that in the onintercepttouchevent method above, we put cellinfo into the tag to return cellinfo information in the gettag method of celllayout. With the cellinfo information, we can call the celllayout. addview method to add the selected control to the desktop. In the workspace class, call the addinscreen method to set its cell information, and then directly call the celllayout. addview method
Objective:Dear friends, please forgive me for so long to start writing this series of the second blog, no way to busy new product release, good nonsense not to say, first review: In my previous blog http://www.cnblogs.com/2010wuhao/p/4363041. html wrote how to configure the Android development environment, just with text and pictures to show the development of Metro style Launcher preliminary design and pro
Delphi XE5 for Android Launcher no black screen wait summary from Embarcadero Official Technology forum to find the next reference, on the black screen processing should have a corresponding method, and this method has a good application value, so did a summary, Delphi XE5 No black screen is essentially the use of Android native development language Java, the pr
Android. Intent. Category. LauncherWhat is the specific function? I will make a small example to help you understand
An application can have multiple activities, each of which is at the same level. Which activity is the first to start when a program is started? Some programs may need to be displayed in the program list, while others do not. How to define it? Android. Intent. Action. Main determines the act
Blog migration-I have migrated my blog to www.ijavaboy.com to better manage it. We are sorry for the inconvenience caused by no updates! New address of this article: Click me
Originally, this article should still write the implementation principle of the item drag in launcher. However, since studying launcher, it has not been implemented before, and now it is all inspired. This is not the case. A month ago
1, please modify the Hotseat_cell_height value in Alps/packages/apps/launcher2/res/values/dimens.xml, for example, change to 100;2, please modify the Alps/packages/apps/launcher2/src/com/android/launcher2/hotseat.java in the Resetlayout () method, the main menu icon to add title, For example: Add Allappsbutton.settext ("Allappsbutton_title");3, please modify the Alps/packages/apps/launcher2/src/com/android/
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.