`

【翻译】(18)通知

 
阅读更多

 

【翻译】(18)通知

 

see

http://developer.android.com/guide/topics/ui/notifiers/index.html

 

原文见

http://developer.android.com/guide/topics/ui/notifiers/index.html

 

-------------------------------

 

Notifications

 

通知

 

Several types of situations may arise that require you to notify the user about an event that occurs in your application. Some events require the user to respond and others do not. For example:

 

有几种类型的情况可能会导致需要你通知用户关于一个发生在你的应用程序内的事件。一些事件需要用户响应而其它则不需要。例如:

 

* When an event such as saving a file is complete, a small message should appear to confirm that the save was successful.

 

* 当一个事件诸如文件保存已经完成,一个小的消息应该出现以肯定保存是成功的。

 

* If the application is running in the background and needs the user's attention, the application should create a notification that allows the user to respond at his or her convenience.

 

* 如果应用程序运行在后台并且需要用户注意,应用程序应该创建一个通知以允许用户在方便的时候响应。

 

* If the application is performing work that the user must wait for (such as loading a file), the application should show a hovering progress wheel or bar.

 

* 如果应用程序正在执行用户必须等待的工作(诸如加载文件),应用程序应该显示一个悬浮的进度轮或进度条。

 

Each of these notification tasks can be achieved using a different technique:

 

这些通知任务的每一种可以用不同的技术实现。

 

* A Toast Notification, for brief messages that come from the background.

 

* Toast通知,用于来自后台的简短消息。

 

* A Status Bar Notification, for persistent reminders that come from the background and request the user's response.

 

* 状态栏通知,用于来自后台的持久提醒并请求用户的响应。

 

* A Dialog Notification, for Activity-related notifications.

 

* 对话框通知,用于与Activity有关的通知。

 

This document summarizes each of these techniques for notifying the user and includes links to full documentation.

 

本文总结这些用于通知用户的技术的每一种并包含完整文档的链接

 

-------------------------------

 

Toast Notification

 

Toast通知

 

(图略:

这个闹钟被设置为从现在开始17小时又57分钟之后。

 

A toast notification is a message that pops up on the surface of the window. It only fills the amount of space required for the message and the user's current activity remains visible and interactive. The notification automatically fades in and out, and does not accept interaction events. Because a toast can be created from a background Service, it appears even if the application isn't visible.

 

Toast通知是一种在窗口表面上弹出的消息。它只填充消息所需数量的空间,而用户的当前活动保持可见和可交互。通知自动地淡进和淡出,并且不会接受任何交互事件。因为一个Toast可以从后台Service中创建,所以即便应用程序不可见它仍会显示。

 

A toast is best for short text messages, such as "File saved," when you're fairly certain the user is paying attention to the screen. A toast can not accept user interaction events; if you'd like the user to respond and take action, consider using a Status Bar Notification instead.

 

Toast最适合短文本消息,诸如在你大概肯定用户正在注意屏幕时显示“文件已保存”。一个Toast不能接受用户交互事件;如果你喜欢用户响应和采取动作,请考虑使用状态栏消息代替它。

 

For more information, refer to Toast Notifications.

 

想获取更多信息,请参考Toast消息。

 

-------------------------------

 

Status Bar Notification

 

状态栏通知

 

(图略:

2009年4月25日 下午3:41

Android 清空通知

通知

特拉维斯

你在哪里? 下午3:39

 

A status bar notification adds an icon to the system's status bar (with an optional ticker-text message) and an expanded message in the "Notifications" window. When the user selects the expanded message, Android fires an Intent that is defined by the notification (usually to launch an Activity). You can also configure the notification to alert the user with a sound, a vibration, and flashing lights on the device.

 

状态栏通知添加一个图标到系统的状态栏(带有一个可选的纸带文本消息)以及在“通知”窗口中的一个可展开的消息。当用户选择被展开的消息时,Android发送一个被通知定义的Intent对象(通常用来启动一个Activity)。你还可以配置通知在设备上用声音,震动,和闪光来提醒用户。

 

This kind of notification is ideal when your application is working in a background Service and needs to notify the user about an event. If you need to alert the user about an event that occurs while your Activity is still in focus, consider using a Dialog Notification instead.

 

此类通知是理想的,当你的应用程序正在工作在后台Service并且需要通知用户一个事件。如果你需要提醒用户一个发生在你的Activity仍然处于焦点时的事件,请考虑使用一个对话框通知代替它。

 

For more information, refer to Status Bar Notifications.

 

想获取更多信息,请参考状态栏通知。

 

-------------------------------

 

Dialog Notification

 

对话框通知

 

(图略:

正在加载。请稍候……

 

A dialog is usually a small window that appears in front of the current Activity. The underlying Activity loses focus and the dialog accepts all user interaction. Dialogs are normally used for notifications and short activities that directly relate to the application in progress.

 

对话框通常是一个显示在当前Activity前方的小窗口。底下的Activity失去焦点而对话框接受所有用户交互。对话框通常用于在进度中直接与应用程序关联的通知和短的活动。

 

You should use a dialog when you need to show a progress bar or a short message that requires confirmation from the user (such as an alert with "OK" and "Cancel" buttons). You can use also use dialogs as integral components in your application's UI and for other purposes besides notifications. For a complete discussion on all the available types of dialogs, including its uses for notifications, refer to Dialogs.

 

在你需要显示一个进度条或一个需要来自用户的确定的短消息(诸如一个带有“确定”和“取消”按钮的警告)时,你应该使用一个对话框。你可还可以使用对话框作为你的应用程序的用户界面中的集成组件并用于除通知外的其它目的。想获取一个关于所有可用类型对话框的完整讨论,包括它用于通知的使用方法,请参考对话框。

 

Except as noted, this content is licensed under Apache 2.0. For details and restrictions, see the Content License.

 

除特别说明外,本文在Apache 2.0下许可。细节和限制请参考内容许可证。

 

Android 4.0 r1 - 01 Dec 2011 20:53

 

-------------------------------

 

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

 

(此页部分内容基于Android开源项目,以及使用根据创作公共2.5来源许可证描述的条款进行修改)

 

 

分享到:
评论

相关推荐

    laravel-vue-i18n-generator:从Laravel翻译生成兼容vue-i18n的包含文件

    Laravel 5.7通知! 在Laravel 5.7中,配置路径已更改,为了使此软件包正常运行,您需要在config\vue-i18n-generator.php为jsPath和jsFile配置正确的路径。安装套件在您的项目中: composer require martinlindhe/...

    rfc中文文档目录,包含部分翻译

    RFC18 IMP-IMP和主机-主机控制联接 RFC19_可用来降低有限交换节点阻塞的两条协议性的建议 RFC20_用于网络交换的 ASCII 格式 RFC21 网络会议 RFC22 主机-主机控制信息格式 RFC23_多重传送的调节信息 RFC24 文档规范 ...

    dw1000用户手册翻译v0.2.pdf

    DW1000的中文数据手册,是英文手册的翻译版,目录如下: 目录 DW1000 用户手册翻译文档 v0.2 ...........................................................................................1 修订记录...............

    Translation-Stats:显示您的WordPress安装上的插件翻译统计信息

    翻译统计 贡献者: pedromendonca 捐赠链接: 标签:国际化,i18n,本地化,l10n... 如果某个插件没有完整的翻译统计信息,则您会看到以下原因之一的通知: 在WordPress.org上找不到插件 在WordPress.org上找不到翻译

    StackExchange开源WebSocket类库NetGain.zip

     Stack Overflow使用 websocket 向用户推送实时的更新内容,比如顶部栏中的通知、投票数、新导航数、新的答案和评论等等。 socket 服务器本身在 web 层上运行,使用原生的 socket。这是一个基于我们的开源库实现的...

    Entity Framework 6 Recipes(中文word翻译版)

    关于EF6的正式书籍很少,这个文章是国内翻译整理出来的,共46个小节。适合循序渐进的学习。 第1部分 开始使用实体框架之历史和框架简述 第2部分 开始使用实体框架之使用介绍 第3部分 实体数据建模基础之创建一个简单...

    TranslationHelper:翻译Rubberduck的个人助手

    弃用通知: 这个项目没有任何积极的发展。 如果您要维护它,非常欢迎您自己购买它,并在问题中大声疾呼。 如果您想使用它,可以考虑使用出色的 。 它提供了更多的功能,并在编写本文时进行了积极维护。 这是什么...

    tidy-translations:TidyCMS转换文件。 结帐并致力于为您的客户提供更好的体验

    整洁的翻译TidyCMS( )-翻译文件。 结帐并承诺为您的客户提供更好的体验。 我们使用i18next作为我们的翻译系统( )。... 如果有任何翻译承诺,则将通知Tidy团队,并且将在审核后将其包含在UI的下一版本中。

    OpenCart 3.0.2.0 英文版.zip

    OpenCart购物车是近年最受瞩目的开源购物商城系统,当初由英国人Daniel一人独立开发,简单易操作且针对搜寻引擎做最佳化处理,多国语言的特点,让各国网友陆续翻译出来的语言包已经超过20种,其中包括中文、俄文、...

    开源论坛系统FUDforum v3.0.4.1

    提供i18n支持当前FUDforum2.3已经翻译成8种语言包括中文;采用模板系统来控制界面外观;基于角色的 权限控制系统;提供短消息发送平台;提供审查和回收站系统;支持附件/投票/全文搜索/IP跟踪/用户禁用/电子报/...

    nodejs-ja:Node.js日语本地化

    nodejs-ja 日语本地化(i18n)推特 (有关io.js信息和日语翻译更新的通知)成员渡边助( ) 小坂麻里子( ) 古川洋介( ) 小林隆( ) 藤田隆( ) 中( ) 代代郎( ) Sota Yamashita( ) 花忠俊( @tdtsh ) ...

    基于生态农业的电子商务微信小程序毕业设计(论文).docx

    6.1.2 控制器 18 6.1.2.1 独立验证 19 6.1.2.2自定义验证器(validate)规则 19 6.1.2.3调用自定义验证方法 20 6.1.3 模型 20 6.1.3.1Model 模型的示例 22 6.1.3.2 关联模型 22 6.1.3.3TP5 的静态调用方法和...

    恋恋南昌VIP美化版 v5.11

    增加设置显示LOGO、横幅和个性版头的切换功能 10、更换了几个风格,比原来更好看些 11、增加主题后面显示精华和hot字样的图片 12、增加鼠标悬停显示最后更新主题功能 13、增加VIP和VIP申请功能,自动发短信通知站长 ...

    spring.net中文手册在线版

    17.7.异常翻译 17.8.参数管理 17.8.1. IDbParametersBuilder 17.8.2. IDbParameters 17.9. Mapping DBNull values 17.10. Basic data access operations 17.10.1. ExecuteNonQuery 17.10.2. ExecuteScalar 17.11. ...

    ipfilter的防火墙HowTo(中文)

    IP Filter Based Firewalls HOWTO <br> xiaojl <zhiyouxjl@sina.com><br> Brendan Conoboy Erik Fichtner $FreeBSD: src/share/examples/ipfilter/ipf-howto.txt,v 1.1.2.1 2002/04/27 20:04:18 ...

    tasks:此插件将允许您以 Elgg 方式创建和管理任务

    为小组成员分配任务通知:作为书签系统。 日历日期多语言(jquery ui i18n 日期选择器) 法语和英语翻译。 您可以通过简单地编辑翻译文件来自定义状态列表和类型列表。 进一步开发:快速输入小部件,任务过滤器。 ...

    djreservation:Django预约系统

    带有模板系统的电子邮件通知 Django Admin后端,用于接受,借用,拒绝保留等管理建议 管理员中的部分保留(并非所有产品都可以借用) 基于Twitter Bootstrap的UI 使用i18n处理翻译 文献资料 参见 安装 用pip安装 ...

    rn-boilerplate:节省构建下一个移动应用程序项目的时间

    rn样板移动应用模板代码组织: 已安装插件react-native-i18n-语言翻译。 react-native-mixpanel-分析react-native-animatable-动画时刻-日期/时间lodash-Javascript实用工具react-native-navigation-导航react-...

    Spring-Reference_zh_CN(Spring中文参考手册)

    7.3.2. Spring里的通知类型 7.3.2.1. 拦截around通知 7.3.2.2. 前置通知 7.3.2.3. 异常通知 7.3.2.4. 后置通知 7.3.2.5. 引入通知 7.4. Spring里的advisor(Advisor) API 7.5. 使用ProxyFactoryBean创建AOP代理 ...

    gobarber-14-mobile:Rocketseat Gobarber训练营移动应用程序

    GoBarber Mobile ... 英文翻译 测试实施 CI(CircleCI) 代码覆盖率(CodeCov) 敬酒实施 图标(iOS / Android) SplashScreen(iOS / Android) 哨兵 CodePush 通知事项 部署(仅限Play商店)

Global site tag (gtag.js) - Google Analytics