首页 > 代码库 > Android开发入门

Android开发入门

Getting Started

Welcome to Training for Android developers. Here you‘ll find sets of lessons within classes that describe how to accomplish a specific task with code samples you can re-use in your app. Classes are organized into several groups you can see at the top-level of the left navigation.

This first group, Getting Started, teaches you the bare essentials for Android app development. If you‘re a new Android app developer, you should complete each of these classes in order:

有言在先

作为一名Windows程序员,不管是为以后的职业生涯打算,还是为了扩展技术视野,学习和掌握一些终端的开发技术总是有益无害的。而作为一名Android的新手,前辈给我的意见是“先不用急着买这书买那书,把Android官网上的入门教程看完了再说”。

个人斗胆在教程原文的基础上补充了一些学习过程中的心得体会,画蛇添足地整理出以下这些批注性的文章。


在启动学习之前,首先要把开发环境部署好:

Building Your First App

构建你的第一个应用
After you‘ve installed the Android SDK, start with this class to learn the basics about Android app development.
  • Creating an Android Project
  • Running Your Application
  • Building a Simple User Interface
  • Starting Another Activity
在你安装了Android SDK之后,开始这个课程以便学习android 程序开发的基本知识。
  • 用 Eclipse 创建一个 Android 工程
  • 运行你的应用
  • 构建一个简单的用户界面
  • 启动另一个活动

Managing the Activity Lifecycle

生命周期的管理

How Android activities live and die and how to create a seamless user experience by implementing lifecycle callback methods.
  • Starting an Activity
  • Pausing and Resuming an Activity
  • Stopping and Restarting an Activity
  • Recreating an Activity
在这里,你将了解到android activities 是如何live和die的,以及如何利用生命周期回调函数完成无缝的用户体验。



  • 启动Activity
  • 暂停和恢复 Activity
  • 停止和重启Activity
  • 重建Activity

Supporting Different Devices

多设备支持

How to build your app with alternative resources that provide an optimized user experience on multiple device form factors using a single APK.
  • Supporting Different Languages
  • Supporting Different Screens
  • Supporting Different Platform Versions
如何通过配置多样的资源文件来构建程序,以优化一个APK文件在不同设备上的用户体验。
  • 多语言支持
  • 多屏幕支持
  • 不同平台版本支持

Building a Dynamic UI with Fragments

通过片段创建灵活的用户界面

How to build a user interface for your app that is flexible enough to present multiple UI components on large screens and a more constrained set of UI components on smaller screens—essential for building a single APK for both phones and tablets.
  • Using the Support Library
  • Creating a Fragment
  • Building a Flexible UI
  • Communicating with Other Fragments
如何灵活的构建程序的用户界面以在大屏设备上展现复杂的UI组件,而在小屏设备上展现相对紧凑的UI组件——这在用同一个APK文件来适配手机和平板上显得非常重要。
  • 利用android支持的库
  • 创建一个片段
  • 建立一个灵活的用户界面
  • 与其他片段交互

Saving Data

数据存储

How to save data on the device, whether it‘s temporary files, downloaded app assets, user media, structured data, or something else.
  • Saving Key-Value Sets
  • Saving Files
  • Saving Data in SQL Databases
如何在设备上储存诸如临时文件、下载的app资源、用户媒体数据、结构化数据等你想存的东西

Interacting with Other Apps

与其他应用程序进行交互

How to build a user experience that leverages other apps available on the device to perform advanced user tasks, such as capture a photo or view an address on a map.
  • Sending the User to Another App
  • Getting a Result from the Activity
  • Allowing Other Apps to Start Your Activity
如何利用设备上其他可用的程序完成诸如拍照,查看地图上的位置等用户行为。
  • 让用户转移到另一个应用程序
  • 从另一个Activity中取回反馈结果
  • 允许其他应用程序去启动您的Activity

Sharing Content

内容共享

How to take your app interaction to the next level by sharing information with other apps, receive information back, and provide a simple and scalable way to perform Share actions with user content.
  • Sending Content to Other Apps
  • Receiving Content from Other Apps
  • Adding an Easy Share Action
如何通过与其他应用共享数据,接受来自其他应用的数据和提供一种简单而具有可扩展性的方式来完成分享用户内容的动作(好绕口)来把你的应用提高到更高的层次——社交应用(误,不过这样感觉牛X点)。
  • 将内容发送到其他应用程序
  • 从其他应用程序接收内容
  • 添加一个简单的共享行动

Android开发入门