Introduction to android--Components

Source: Internet
Author: User

To develop Android apps, you need to understand view, Activity, Fragment, Intent, ContentProvider, Service, androidmanifest.xml files, and AVD.

    • View:view is a UI element. is the basic building block that forms the user interface. A view can be a button, label, Text field, or various other UI elements.
    • Activity:activity usually represents a screen in the public program. Typically contains one or more view, which can contain no view. It can complete the operation of viewing data, creating data, or editing data. Most Android-referenced programs have multiple activity in them.
    • Fragment:fragment is like a child activity, activity can display one or more Fragment on the screen. When the screen is small, an activity is more likely to contain only one fragment, and may use the same fragment as the large screen.
    • Intent: Typically used to define the intent to perform some kind of work. Intent tasks that can be performed:

Broadcast messages

Start Service

Start activity

Display a Web page or a group of contacts

Call or answer a call

  • ContentProvider: A standard mechanism for sharing data that allows applications to use data from other applications.
  • Service: Similar to services in Windows, long running in a background process. It is divided into two types: Local Service and remote service. A local service is a component that can be accessed only by the application that hosts the service. A remote service is a service that is accessed remotely by other applications running on the device.
  • Androidmanifest.xml is similar to the Web. xml file in Java EE, which defines the content and behavior of the application. For example: List the activity and service of the application, and the permissions and functions required to run the application.
  • AVD: Allows developers to test applications without using a real Android device. That is: Simulator.

Introduction to android--Components

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.