What does launcher do?

Source: Internet
Author: User

From: http://blog.csdn.net/android_tutor/article/details/5629337

In the previous section, I talked about how to download the launcher tutorial. Today, I will focus on what launcher is and what is its mysterious stuff?

Launcher, also known as homescreen, is the application we first saw when starting Android phones. This application is special and has a tough task.

It is responsible for all the operations except for the application itself. It is responsible for several desktops, click the application icon to start the application, and display the context menu on the desktop for a long time,

After a long period of time, you can press the icon on the desktop to display the recycle bin, drag the application icon to reposition, and perform a series of operations. I will cut some pictures to make it easier for everyone to understand!

 


Figure 1: boot screen, laucher main interface Figure 2: Open the drawer to list all our installed applications

 

 

 

Figure 3: Long press icon, the drawer turns into a garbage bin Figure 4: sliding your finger to the left to enter another desktop

 

 

Let's take a look at these figures. All the applications we listed in figure 2 do not include applications such as launcher and widget, because the applications we listed are only in androidmanifest. the xml configuration file has an application marked as this (the following code :)

 

[Java]
View plaincopy
  1. <Activity Android: Name = ". Homestyle"
  2. Android: theme = "@ Android: style/theme. notitlebar"
  3. Android: Label = "@ string/app_name">
  4. <Intent-filter>
  5. <Action Android: Name = "android. Intent. Action. Main"/>
  6. <Category Android: Name = "android. Intent. Category. launcher"/>
  7. </Intent-filter>
  8. </Activity>

 

Lines 5 and 6 are the key. With these two sentences, your application will be listed. In particular, launcher declares that the only activity in this application is as follows:

[Java]
View plaincopy
  1. <Activity
  2. Android: Name = "launcher"
  3. Android: launchmode = "singletask"
  4. Android: cleartaskonlaunch = "true"
  5. Android: statenotneeded = "true"
  6. Android: theme = "@ Android: style/theme. wallpaper. notitlebar"
  7. Android: screenorientation = "nosensor"
  8. Android: windowsoftinputmode = "stateunspecified | adjustpan">
  9. <Intent-filter>
  10. <Action Android: Name = "android. Intent. Action. Main"/>
  11. <Category Android: Name = "android. Intent. Category. Home"/>
  12. <Category Android: Name = "android. Intent. Category. Default"/>
  13. <Category Android: Name = "android. Intent. Category. Monkey"/>
  14. </Intent-filter>
  15. </Activity>

 

Here, row 11th plays a role. Do you see the difference between launcher and common applications? When it becomes home, when we reinstall a launcher, click the Home Key of the mobile phone to display the launcher list, for example:

 


Figure 5: launcher list Figure 6: The legendary launcher2

 

OK. Let's talk about it today. Please leave a message if you don't understand anything! I will try to reply on time. Thank you ~

From: http://blog.csdn.net/android_tutor/article/details/5629337

In the previous section, I talked about how to download the launcher tutorial. Today, I will focus on what launcher is and what is its mysterious stuff?

Launcher, also known as homescreen, is the application we first saw when starting Android phones. This application is special and has a tough task.

It is responsible for all the operations except for the application itself. It is responsible for several desktops, click the application icon to start the application, and display the context menu on the desktop for a long time,

After a long period of time, you can press the icon on the desktop to display the recycle bin, drag the application icon to reposition, and perform a series of operations. I will cut some pictures to make it easier for everyone to understand!

 


Figure 1: boot screen, laucher main interface Figure 2: Open the drawer to list all our installed applications

 

 

 

Figure 3: Long press icon, the drawer turns into a garbage bin Figure 4: sliding your finger to the left to enter another desktop

 

 

Let's take a look at these figures. All the applications we listed in figure 2 do not include applications such as launcher and widget, because the applications we listed are only in androidmanifest. the xml configuration file has an application marked as this (the following code :)

 

[Java]
View plaincopy
  1. <Activity Android: Name = ". Homestyle"
  2. Android: theme = "@ Android: style/theme. notitlebar"
  3. Android: Label = "@ string/app_name">
  4. <Intent-filter>
  5. <Action Android: Name = "android. Intent. Action. Main"/>
  6. <Category Android: Name = "android. Intent. Category. launcher"/>
  7. </Intent-filter>
  8. </Activity>

 

Lines 5 and 6 are the key. With these two sentences, your application will be listed. In particular, launcher declares that the only activity in this application is as follows:

[Java]
View plaincopy
  1. <Activity
  2. Android: Name = "launcher"
  3. Android: launchmode = "singletask"
  4. Android: cleartaskonlaunch = "true"
  5. Android: statenotneeded = "true"
  6. Android: theme = "@ Android: style/theme. wallpaper. notitlebar"
  7. Android: screenorientation = "nosensor"
  8. Android: windowsoftinputmode = "stateunspecified | adjustpan">
  9. <Intent-filter>
  10. <Action Android: Name = "android. Intent. Action. Main"/>
  11. <Category Android: Name = "android. Intent. Category. Home"/>
  12. <Category Android: Name = "android. Intent. Category. Default"/>
  13. <Category Android: Name = "android. Intent. Category. Monkey"/>
  14. </Intent-filter>
  15. </Activity>

 

Here, row 11th plays a role. Do you see the difference between launcher and common applications? When it becomes home, when we reinstall a launcher, click the Home Key of the mobile phone to display the launcher list, for example:

 


Figure 5: launcher list Figure 6: The legendary launcher2

 

OK. Let's talk about it today. Please leave a message if you don't understand anything! I will try to reply on time. Thank you ~

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.