Overview of various functions of the Android Java package

Source: Internet
Author: User

Anyone familiar with the Android operating system knows that the Java language is used to develop Android applications. To flexibly apply this system, you should be familiar with the various functions of the Android Java package. In general JAVA applications, if you need to reference the base class library, you usually need to use the following method:

 
 
  1. import javax.swing.*;  

The preceding code references the java gui Component Swing. javax. swing is a package in JAVA.

Adroid 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:

 
 
  1. package com.android.calculator2;   
  2. import android.app.Activity;   
  3. import android.os.Bundle;   
  4. import android.util.Log;   
  5. import android.util.Config;   
  6. import android.view.Menu;   
  7. import android.view.MenuItem;   
  8. import android.view.Window;   
  9. import android.view.View;   
  10. import android.widget.Button;   
  11. import android.widget.ListView;   
  12. import android.content.res.Configuration;  

In Android, various packages are written as android. *. The important packages are described as follows:

  1. Android. app: provides high-level program models and basic runtime Environments
  2. Android. content: contains various classes for accessing and publishing device data.
  3. Android. database: browses and operates databases through content providers
  4. Android. graphics: underlying graphics library, including canvas, color filter, vertex, rectangle,
    They can be drawn directly to the screen.
  5. Android. location: class for locating and Related Services
  6. Android. media: Provides media interfaces for managing multiple types of audio and video.
  7. Android.net: class that provides network access assistance, exceeding the normal java.net. * interface
  8. Android. OS: Provides system services, message transmission, and IPC Mechanisms.
  9. Android. opengl: Provides OpenGL tools.
  10. Android. provider: provides a class to access Android content providers.
  11. Android. telephony: provides API Interaction Related to dialing.
  12. Android. view: provides a basic user interface framework.
  13. Android. util: a tool-based method, such as time and date operations.
  14. Android. webkit: default browser operation interface
  15. Android. widget: contains a variety of UI elements, most of which are visible)
    Used on the application Screen

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.