Android Java Package Overview of various functions

Source: Internet
Author: User

The development of Android apps basically uses the Java language. If you want to apply this system flexibly, you should familiarize yourself with the various functions of the Android Java package.

In a generic Java application, if you need to reference the underlying class library, you typically want to use the following method:


Import javax.swing.*;  

The above code indicates that the GUI component referencing Java swing,javax.swing is a package in Java.

Adroid provides some extended Java class libraries, which are divided into several packages, each containing several classes. For example: In Android, the calculator is a relatively simple program, its entry program file is Calculator.java, the file contains the following content:


    Package Com.android.calculator2;       Import android.app.Activity;       Import Android.os.Bundle;       Import Android.util.Log;       Import Android.util.Config;       Import Android.view.Menu;       Import Android.view.MenuItem;       Import Android.view.Window;       Import Android.view.View;       Import Android.widget.Button;       Import Android.widget.ListView;       Import android.content.res.Configuration;  

In Android, various packages are written in android.*, and the description of the important package is as follows:


(1) Android.app: Provide high-level program model, provide basic operating environment.
(2) Android.content: Contains a variety of classes to access and publish data on the device
.
(3) Android.database: Browse and manipulate the database through the content provider.

(4) Android.graphics: The bottom of the graphics library, including the canvas, color filters, dots, rectangles, you can draw them directly to the screen.
(5) Android.location: The class of positioning and related services.

(6) Android.media: Provides some classes to manage a variety of audio, video media interface.

(7) Android.net: Provides a class to help network access, more than the usual java.net.* interface.

(8) Android.os: Provides the system service, the message transmission, the IPC mechanism.

(9) Android.opengl: Tools to provide OpenGL.

Android.provider: Provides class access to Android content providers.

(one) Android.telephony: Provides API interaction related to making calls.

Android.view: Provides a basic interface framework for the user interface.

Android.util: A tool-related approach, such as a time-date operation.

Android.webkit: Default browser Operation interface.

(Android.widget): Contains various UI elements (mostly visible) used in the application's screen.






Android Java Package Overview of various functions

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.