[Entry 2] functions of various Java packages in Android

Source: Internet
Author: User
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

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.