二、App Components(应用程序组件)
0、概述
App Components Android's application framework lets you create rich and innovative apps using a set of reusable components. This section explains how you can build the components that define the building blocks of your app and how to connect them together using intents. 应用程序组件 Android应用程序框架能够可以让您使用一组可重用的组件创建丰富和创新应用。本节将介绍如何使用这些组件构建您的应用程序的模块,以及如何使用Intent将它们连接在一起。 |
BLOG ARTICLES(博客文章) Using DialogFragmentsIn this post, I'll show how to use DialogFragments with the v4 support library (for backward compatibility on pre-Honeycomb devices) to show a simple edit dialog and return a result to the calling Activity using an interface. 使用DialogFragments 在这篇文章中,我将展示如何通过Support V4库(为了向后兼容Honeycomb之前的版本)使用DialogFragments,以显示一个简单的编辑对话框,并使用接口的结果返回到调用活动。 Fragments For AllToday we've released a static library that exposes the same Fragments API (as well as the new LoaderManager and a few other classes) so that applications compatible with Android 1.6 or later can use fragments to create tablet-compatible user interfaces. 用于所有版本的Fragment 如今我们已经发布了一个静态的库公开相同的Fragment API(以及新的LoaderManager和其他的类),以便于Android 1.6或者更高的版本可以使用Fragment来创建兼容平板的用户界面。 Multithreading for PerformanceA good practice in creating responsive applications is to make sure your main UI thread does the minimum amount of work. Any potentially long task that may hang your application should be handled in a different thread. 多线程性能 在创建响应的应用一个好的做法是确保你的主UI线程干尽量少的事情。应该让比较耗时的操作都在其他线程完成。
|
TRAINING(实验) Managing the Activity LifecycleThis class explains important lifecycle callback methods that each Activity instance receives and how you can use them so your activity does what the user expects and does not consume system resources when your activity doesn't need them. 管理Activity的生命周期 这个课程中,每个Activity实例接收重要的生命周期回调方法,以及如何使用它们让你的活动完成用户期望的结果,并且当你的活动并不需要他们的时候,释放系统资源。 Building a Dynamic UI with FragmentsThis class shows you how to create a dynamic user experience with fragments and optimize your app's user experience for devices with different screen sizes, all while continuing to support devices running versions as old as Android 1.6. 使用Fragment构建动态的UI 这个课程向你展示了如何使用Fragment创建一个动态的用户界面,并且针对不同的设备屏幕尺寸优化了你的应用的用户体验,并且支持所有设备运行的版本,甚至更古老的Android 1.6。 Sharing ContentThis class covers some common ways you can send and receive content between applications using Intent APIs and the ActionProvider object. 分享内容 这个课程涵盖了你在两个应用程序中使用Intent APIs和ActionProvider对象发送或者接收内容所有方法。 |