Android applications Program In development, the Java language is usually used. In addition to the basic knowledge of the Java language, you also need to understand the extended Java functions provided by Android. In general Java applications, if you need to reference the base class library, you usually need to use the following method: Import javax. Swing .*; Above Code Refers to the reference to the Java GUI Component swing, javax. Swing is a package in Java. Android provides some extended Java class libraries. The class libraries are divided into several packages. Each package contains several classes. For example, in Android, the calculator is a relatively simple program, and its entry program file is calculator. Java, which 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 as Android. *. The important packages are described as follows: Android. app: provides high-level program models and basic runtime Environments Android. Content: contains various classes for accessing and publishing device data. Android. Database: browses and operates databases through content providers Android. Graphics: The underlying graphics library, including canvas, Color Filtering, vertices, and rectangles, which can be directly drawn Screen . Android. Location: class for locating and Related Services Android. Media: provides some categories to manage multiple audios, Video Media interface Android.net: HelpNetwork The accessed class exceeds the normal java.net. * interface. Android. OS: Provides system services, message transmission, and IPC Mechanisms. Android. OpenGL: Provides OpenGL tools. Android. provider: provides a class to access Android content providers. Android. Telephony: provides API Interaction Related to dialing. Android. View: provides a basic user interface framework. Android. util: a tool-based method, such as time and date operations. Android. WebKit: default browser operation interface Android. Widget: contains various UI elements (mostly visible) used on the application Screen |
This article is transferred fromWww.35java.com