| Making a recording |
{0>进行录制 |
| To make a recording, you start a recording session, interact with your application, and then stop recording. |
要进行录制,请开始录制会话,与应用程序进行交互操作,然后停止录制。 |
| To make a recording: |
这可以帮助您事先熟悉想要录制的活动类型,例如页面加载、图像列表滚动性能等等,然后便可以严格按照该脚本进行操作。 |
| Open the page you want to record. |
要进行录制,请执行以下操作:打开要录制的页面。 |
| Open the Timeline panel and start recording by doing one of the following: |
打开“Timeline”(时间轴)面板,然后执行以下操作之一来开始录制:单击“Timeline”(时间轴)面板底部的圆形录制按钮。 |
| Click the round record button at the bottom of the Timeline panel. |
按下键盘快捷键 Ctrl+E(在 Mac 上为 Cmd+E)。 |
| The Record button turns red during a recording. |
录制期间,录制按钮会变为红色。 |
| Perform any necessary user actions to record the desired behavior. |
执行任何必要的用户操作来录制所需的行为。 |
| Stop the recording by pressing the now red record button, or repeating the keyboard shortcut. |
单击现在显示为红色的录制按钮,或者再次按下上述键盘快捷键,即可停止录制。 |
| Controllers |
控制器 |
| In Angular, a Controller is a JavaScript constructor function that is used to augment the Angular Scope. |
在 Angular 中,控制器是一个 JavaScript 构造函数,用于增加角度范围。 |
| When a Controller is attached to the DOM via the ng-controller directive, Angular will instantiate a new Controller object, using the specified Controller's constructor function. |
通过 ng 控制器指令将控制器附加到 DOM 时,Angular 将使用指定控制器的构造函数实例化新的控制器对象。 |
| A new child scope will be available as an injectable parameter to the Controller's constructor function as $scope. |
新的子范围将用作控制器构造函数的可注入参数,称为 $scope。 |
| Do not use controllers to: |
请勿将控制器用于以下方面:- 操作 DOM — 控制器应仅包含业务逻辑。 |
| - Manipulate DOM — Controllers should contain only business logic. |
若在控制器中加入任何表示逻辑,其可测试性会受到显著影响。 |
| Putting any presentation logic into Controllers significantly affects its testability. |
多数情况下,Angular 具有相关数据绑定和指令来封装手动 DOM 操作。 |
| Angular has databinding for most cases and directives to encapsulate manual DOM manipulation. |
- 设置输入格式 — 请改为使用角度格式控件。 |
| - Format input — Use angular form controls instead. |
- 过滤输出 — 请改为使用角度过滤器。 |
| - Filter output — Use angular filters instead. |
- 在控制器之间共享代码或状态 — 请改为使用角度服务。 |
| - Share code or state across controllers — Use angular services instead. |
- 管理其他组件的生命周期(例如,创建服务实例)。 |
| - Manage the life-cycle of other components (for example, to create service instances). |
v7 gridlayout library |
| v7 gridlayout library |
此库添加了对 GridLayout 类的支持,让您可以使用矩形网格排列用户界面元素。 |
| This library adds support for the GridLayout class, which allows you to arrange user interface elements using a grid of rectangular cells. |
有关 v7 gridlayout library API 的详细信息,请参见 API 参考资料中的 android.support.v7.widgetpackage。 |
| This library is located in the /extras/android/support/v7/gridlayout/ directory after you download the Android Support Libraries. |
下载“Android 支持库”后,可在 /extras/android/support/v7/gridlayout/ 目录中找到该库。 |
| The library contains user interface resources. |
该库包含用户界面资源。 |
| To include it in your application project, follow the instructions for Adding libraries with resources. |
要在应用程序项目中包含该库,请按照“添加带有资源的库”中的说明操作。 |