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
Android Metro-style Launcher development series 3, androidmetro
Preface:
Dear friends, it's time to update the article every week. It was originally sent out on Sunday. Isn't it a catch-up with the Tomb Sweeping Day? The Queen spoke and played with her two or half days before the Tomb Sweeping Day, I will only write my blog on Monday afternoon. Where is the Queen? Where is it? There is oppression! Well, let
(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
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,
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
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
Objective:Everyone small partners, again to the weekly update article time, originally was Sunday can send out, this is not to catch the tomb-sweeping day, the Queen said, two days before the Qingming Festival to play with her, only left me Monday afternoon half a day to write a blog, where there is a queen where there is oppression ah have wood! All right, gossip. Less, on a blog (Android Metro style of the Launc
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
no space is found, the system prompts the user that the screen does not have enough space to accommodate.
With the above analysis, the following describes how launcher completes each step.
When the user presses the desktop for a long time, the motion_down event is passed to celllayout. In the onintercepttouchevent method of celllayout, the user determines whether the current long press is in a blank area. If yes, convert the current coordinate to the
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
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
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
When it comes to developing an Android system, there are times when you encounter a need to:Because it is an independent brand, also involves a service in the push, so hope launcher can be fixed, third party can install, but press the home key, must return the system default launcherThrough the analysis of the home key process, found that can be very simple to do, and now share with you:Path: Frameworks\bas
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
To run a command to create a desktop file:sudo gedit/usr/share/applications/android_studio.desktopOpen the window and enter the following, noting that exec and icon are modified to the path of Android studio under their own system.[Desktop Entry]Type=applicationName=android StudioExec= "/opt/android-studio/bin/studio.sh"%fIcon=/opt/
Android Launcher icon box-added to optimize display effect, androidlauncher
Read the code and explain it. Mainly used for image processing
PorterDuff. Mode. SRC_ATOPSRC_ATOP
The source pixel and target pixel are mixed to make the upper-layer graph display in the center to achieve the framed effect.
Package com. ferris. launchericonutils; import android. app. act
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/
A shortcut icon consists of two parts: the application icon and the Application name. In fact, the shortcut icon in launcher only inherits the textview control and re-draws it to make the background light gray (I don't know what the color is) the elliptical background, the displayed text color is white. Textview has the Android: drawabletop; drawablebottom (not all of them are written here) attribute to dis
Android Metro-style Launcher development series 2, androidmetro
Preface:Dear friends, please forgive me for writing this series of second blogs after so long, so I cannot publish new products. If you don't talk nonsense, let's review them first: posted on my previous blog!
Launcher main framework implementation:The Launcher
(Intent.extra_shortcut_intent,new Intent ( This,mainactivity.class)); Setresult (result_ok,returnintent); Finish ();}}}3. The above shortcut can only be added manually, if you want to add shortcut dynamically, you must send the broadcast. Android Launcher2 Source provides the followingThis also means that we send the broadcast must declare the permissions, as well as the designation Also in code calls (also, dynamic addition of shortcut must specify
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.