Recent summary of Android learning-2

Source: Internet
Author: User

No matter what you study, there is always a process of memorizing data. The purpose is to understand the structure of knowledge, and then 1.1 points to understand the more difficult concept. I taught myself anroid for about two months, and I haven't written code yet. Because I don't want to learn through the rigid imitation of other people writing code. I want to understand the main knowledge structure of Android, use features and principles, and then naturally have the idea of writing code.

After two months of learning, I went to see other people's blog about Android, and found the speed of reading and understanding improved a lot. I'll take a look at my recent learning comprehension.

What's 1.Activity? An activity is a GUI component of the Android system, which is the equivalent of Windows. Usually there is a main activity in an app, and other activity is opened by it; there are some already-written activity in the system itself, They have the same set of Intentfiler as the broadcast receiver Broadcastreceiver (used to interact with other applications), and we can set the intent action to match the activity to be invoked, To start it. than Intent.action_dial, you can invoke the phone dial panel. If multiple activity filters this ACTION, you are prompted to select one of the activity to display.

2. All existing Activiy are stored in the form of stacks. For example, the newest activity is on the top of the stack, If this activiy is closed, the actvity below it will be displayed. A activity is usually initiated by one activity through the Startactivityforresult method, and attempts to get the value returned by the new actvity by means of the Onactivityresult method. The new actvity closes itself by calling its own finish (), Returns the return value at the same time. The activity can also be actively closed through the Finishactivity method of the main activity.

The 3.android mobile phone usually has 3 keys, list keys, main interface home button, and return key. The list key can also be used to call the system's list menu and to view the recently opened application, which can be recent by a list of most recently opened programs. Or, like the millet system, kill all of their processes, releasing part of the memory. The home key, when you use an application, you can suspend the application at any time (and not close), the interface to the main interface, and then through the list key or click the application icon to restore (Resume) this application. The back key can close the current activity in the activity stack.

4.android the difference between StartService and Bindservice. StartService start its context (can be an activity or a service) And it is independent of each other. For example, a service is started in a context, and the service can continue to run when the context is closed. Bindservice is the context and service bound together, If the context is closed, the service will also be closed.

5.APP and activity closure and memory release: Reference http://blog.csdn.net/veryitman/article/details/6574940;

Related Article

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.