初识Andriod

Developer Tools

The Android Developer Tools (ADT) plugin for Eclipse provides a professional-grade development environment for building Android apps. It's a full Java IDE with advanced features to help you build, test, debug, and package your Android apps.

Free, open-source, and runs on most major OS platforms.
To get started, download the Android SDK.

Android开发工具(ADT)插件为Eclipse构建Android应用程序提供了一个专业级的开发环境。这是一个具有先进功能完整的Java IDE来帮助你建立,测试,调试,包装你的Android应用程序。

免费的,开源的,运行在大多数主要的操作系统平台。

开始的时候要下载Android SDK。

Full Java IDE

  • Android-specific refactoring, quick fixes, integrated navigation between Java and XML resources.
  • Enhanced XML editors for Android XML resources.
  • Static analysis tools to catch performance, usability, and correctness problems.
  • Build support for complex projects, command-line support for CI through Ant. Includes ProGuard and app-signing.
  • Template-based wizard to create standard Android projects and components.
  • Android特有的重构快速修复Java和XML资源之间的集成导航
  • Android的XML资源提高XML编辑器。

    静态分析工具捕捉性能,可用性,正确性问题。

    建立复杂项目的支持,通过蚂蚁CI命令行支持。包括移位和应用程序签名。

    基于模板的向导创建标准Android项目和组件。


  • Graphical UI Builders

    • Build rich Android UI with drag and drop.
    • Visualize your UI on tablets, phones, and other devices. Switch themes, locales, even platform versions instantly, without building.
    • Visual refactoring lets you extracts layout for inclusion, convert layouts, extract styles.
    • Editor support for working with custom UI components.

    通过拖放和删除建立丰富的Android用户界面。

    Visualize(可视化)想象你的用户界面在平板电脑,手机,和其他设备。开关的主题,地点,甚至平台版本的瞬间,没有建筑。

    让你的视觉重构提取版面内容,将提取的布局,风格。

    对于自定义UI部件工作编辑器支持。


  • On-device Developer Options

    • Enable debugging over USB.
    • Quickly capture bug reports onto the device.
    • Show CPU usage on screen.
    • Draw debugging information on screen such as layout bounds, updates on GPU views and hardware layers, and other information.
    • Plus many more options to simulate app stresses or enable debugging options.

    To access these settings, open the Developer options in the system Settings. On Android 4.2 and higher, the Developer options screen is hidden by default. To make it available, go toSettings > About phone and tap Build number seven times. Return to the previous screen to find Developer options.

  • 启用USB调试过的。

    快速捕获bug报告到装置

    在屏幕上显示CPU使用率。

    在屏幕上绘制调试等布局界限信息,在GPU的观点和硬件层更新,和其他信息。

    加上更多的选项来模拟应用程序应力或使调试选项。

    要访问这些设置,打开系统设置中的开发商选择。在Android 4.2和更高版本,开发者选项是默认隐藏。可以,去tosettings >电话和自来水建设数量的七倍。返回先前屏幕找到开发商的选择。

    • Use any commercial Android hardware device or multiple devices.
    • Deploy your app to connected devices directy from the IDE.
    • Live, on-device debugging, testing, and profiling
    • Develop on Virtual Devices

      • Emulate any device. Use custom screen sizes, keyboards, and other hardware components.
      • Advanced hardware emulation, including camera, sensors, multitouch, telephony.
      • Develop and test for broad device compatibility.
      • 使用任何商业Android的硬件设备或多个设备。 
      • 部署你的应用程序到直接连接到集成开发环境中 的设备
      • 直播,设备调试,测试和分析。

    Powerful Debugging

    • Full Java debugger with on-device debugging and Android-specific tools.
    • Built-in memory analysis, performance/CPU profiling, OpenGL ES tracing.
    • Graphical tools for debugging and optimizing UI, runtime inspecton of UI structure and performance.
    • Runtime graphical analysis of your app's network bandwidth usage.

    完整的Java调试器在设备调试和Android特定的工具。

    内置的内存分析,性能/ CPU剖面,OpenGL ES跟踪。

    用于调试和优化用户界面的图形化工具,界面结构和性能运行检验。

    你的应用程序运行时的网络带宽使用的图形分析。


    Testing

    • Fully instrumentated, scriptable test environment.
    • Integrated reports using standard test UI.
    • Create and run unit tests on hardware devices or emulator.

    全计算机图像,脚本化的测试环境。

    使用标准的测试用户界面的综合报告。

    创建和硬件设备或模拟器运行单元测试。


    Native Development

    • Support for compiling and packaging existing code written in C or C++.
    • Support for packaging multiple architectures in a single binary, for broad compatibility.

    编译和打包的现有代码写在C或C + +的支持。

    在一个单一的二元包装多个架构的支持,广泛的兼容性。


An activity is a single, focused thing that the user can do. Almost all activities interact with the user, so the Activity class takes care of creating a window for you in which you can place your UI with setContentView(View). While activities are often presented to the user as full-screen windows, they can also be used in other ways: as floating windows (via a theme with windowIsFloating set) or embedded inside of another activity (using ActivityGroup). There are two methods almost all subclasses of Activity will implement:

一个活动是一个用户可以做的单一的,集中的事情。几乎所有的活动与用户进行交互,所以Activity类负责创建一个窗口,用setContentView(视图)创建你的UI(用户界面)。虽然活动往往呈现给用户的全屏窗口,他们也可以以其他方式使用:作为浮动窗口(通过与windowIsFloating集一个主题),或者嵌入在另一个活动的内部(使用ActivityGroup)。有两种方法活动的几乎所有子类将实施:

  • onCreate(Bundle) is where you initialize your activity. Most importantly, here you will usually call setContentView(int) with a layout resource defining your UI, and using findViewById(int) to retrieve the widgets in that UI that you need to interact with programmatically.
  • onCreate(Bundle)是初始化你的活动的地方。最重要的是通常会调用setContentView(int布局的资源定义你的UI并在你需要通过编程方式和用户交互的界面中使用findViewById(int检索工具
  • onPause() is where you deal with the user leaving your activity. Most importantly, any changes made by the user should at this point be committed (usually to the ContentProvider holding the data).
  • onpause()是你处理用户离开你的活动的地方。最重要的是由用户所做的任何更改都必须在这一点上被提交(通常是ContentProvider持有数据)

Developer Guides

The Activity class is an important part of an application's overall lifecycle, and the way activities are launched and put together is a fundamental part of the platform's application model. For a detailed perspective on the structure of an Android application and how activities behave, please read the Application Fundamentals and Tasks and Back Stack developer guides.

这个Activity类是一个应用程序的整个生命周期的重要组成部分,和活动发起和放在一起的方式是平台的应用模型的一个基本组成部分。一个Android应用程序的结构进行了详细的角度和如何活动的行为请阅读应用基础和任务和后退堆栈开发者指南Fragme

ts

Starting with HONEYCOMB, Activity implementations can make use of the Fragment class to better modularize their code, build more sophisticated user interfaces for larger screens, and help scale their application between small and large screens.

随着HONEYCOMB的开始,类的实现可以利用Fragmen类以更好地模块化的代码,构建更复杂的用户界面为大屏幕,并帮助小规模和大屏幕之间的应用程序。

Activity Lifecycle

Activities in the system are managed as an activity stack. When a new activity is started, it is placed on the top of the stack and becomes the running activity -- the previous activity always remains below it in the stack, and will not come to the foreground again until the new activity exits.

类在系统中作为一个活动堆栈管理。当一个新的活动开始它被放在堆栈的顶部成为正在运行的活动——在栈中,以前的活动始终在它下面不会到前台来直到新活动的出现

An activity has essentially four states:

  • If an activity in the foreground of the screen (at the top of the stack), it is active or running.
  • 如果一个在前台的activity获得焦点(在栈顶)是积极的或运行
  • If an activity has lost focus but is still visible (that is, a new non-full-sized or transparent activity has focus on top of your activity), it is paused. A paused activity is completely alive (it maintains all state and member information and remains attached to the window manager), but can be killed by the system in extreme low memory situations.
  • 如果一个活动失去焦点但仍然是可见的(即,一个新的非全尺寸的或透明的活动已经在你的行动重点),它停了下来。一个暂停的activity保持所有状态和成员信息和保持附着到窗口管理器)可以在极低内存的情况下,被系统杀死
  • If an activity is completely obscured by another activity, it is stopped. It still retains all state and member information, however, it is no longer visible to the user so its window is hidden and it will often be killed by the system when memory is needed elsewhere.
  • 如果一个活动的另一个活动完全遮蔽,它停止。它仍然保留了所有状态和成员信息然而它不再是对用户可见窗口被隐藏,往往会被系统杀死在其它地方需要内存时
  • If an activity is paused or stopped, the system can drop the activity from memory by either asking it to finish, or simply killing its process. When it is displayed again to the user, it must be completely restarted and restored to its previous state.
  • 如果活动被暂停或停止时,系统可以从记忆的活动要求它完成,或简单地杀死它的进程。它再次显示给用户它必须完全重启并恢复到原来的状态


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值