首页 > 移动平台 > 详细

Android Development Notes-2

时间:2015-05-02 18:12:47      阅读:197      评论:0      收藏:0      [点我收藏+]

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

Android Development Notes-2

原文:http://blog.csdn.net/yu444/article/details/45440657

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!