Android教程網
  1. 首頁
  2. Android 技術
  3. Android 手機
  4. Android 系統教程
  5. Android 游戲
 Android教程網 >> Android技術 >> 關於Android編程 >> Android Development Notes-2

Android Development Notes-2

編輯:關於Android編程

Summary:SDK, ADB, Active, Intents and Tasks

-The Android SDK is made of mostly off-the-shelf components, plus some purpose-built components. In many cases, configurations, plug-ins, and extensions adapt these components to Android. The Android SDK is a study in the efficient development of a modern and complete SDK.

-adb is a program that enables you to control both emulators and devices, and to run a shell in order to execute commands in the environment of an emulator or device.

-The Dalvik Debug Monitor Server (DDMS) is a traffic director between the single port that Eclipse (and other Java debuggers) looks for to connect to a Java Virtual Machine
(JVM) and the several ports that exist for each Android device or virtual device, and for each instance of the Dalvik virtual machine (VM) on each device.

\

-Android introduces a richer and more complex approach by supporting multiple application entry points. Android programs should expect the system to start them in different places, depending on where the user is coming from and what she wants to do next.

-An Android activity is both a unit of user interaction—typically filling the whole screen of an Android mobile device—and a unit of execution. When you make an interactive Android program, you start by subclassing the Activity class.

-How, then does one activity invoke another, and pass information about what the user wants to do? The unit of communication is the Intent class. An Intent represents an
abstract description of a function that one activity requires another activity to perform

 

public class TestActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
-When the system starts this activity it calls the constructor for TestActivity , a subclass of Activity , and then calls its onCreate method. This causes the view hierarchy described in the main.xml file to load and display. The onCreate method kicks off the life cycle of the Activity

 

-Each activity in an Android application is largely separate from other activities

-applications describe an Intent that they want to execute and ask the system to find one that matches

\


Next: Android Component

  1. 上一頁:
  2. 下一頁:
熱門文章
閱讀排行版
Copyright © Android教程網 All Rights Reserved