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