{"action":"created","comment":{"url":"https://api.github.com/repos/xitu/gold-miner/pulls/comments/68498350","id":68498350,"diff_hunk":"@@ -1,44 +1,48 @@\n >* 原文链接 : [Notifications in Android N](https://android-developers.blogspot.hk/2016/06/notifications-in-android-n.html)\n * 原文作者 : Ian Lake\n * 译文出自 : [掘金翻译计划](https://github.com/xitu/gold-miner)\n-* 译者 : \n+* 译者 :\n * 校对者:\n \n-Android notifications are often a make-or-break interaction between your Android app and users. To provide a better user experience, notifications on Android N have received a visual refresh, improved support for custom views, and expanded functionality in the forms of Direct Reply, a new `MessagingStyle`, and bundled notifications.\n \n-### Same notification, new look\n+Android 通知往往是应用和用户之间至关重要的交互形式。为了提供更好的用户体验，Android N 在通知上做出了诸多改进：收到消息后的视觉刷新，改进对自定义视图的支持，扩展了更加实用的直接回复消息的形式，新的 `MessagingStyle`，捆绑的通知。\n \n-The first and most obvious change is that the default look and feel of notifications has significantly changed. Many of the fields that were spread around the notifications have been collapsed into a new header row with your app’s icon and name anchoring the notification. This change ensured that the title, text, and large icon are given the most amount of space possible and, as a result, notifications are generally slightly larger now and easier to read.\n+### 同样的通知，不一样的“面貌”\n+\n+首先，最明显的变化是通知的默认外观已经显著改变。很多分散在通知周围的字段被折叠进新的标题行内，和应用程序的图标、名称固定在通知内。这一改变是为了确保尽可能腾出更多空间给标题、文本和大图标，这样一来通知就比现在的稍大些，更加易读。\n \n ![](http://ww3.sinaimg.cn/large/a490147fgw1f4w3pakcdrj20hs0853zv.jpg)\n \n-Given the single header row, it is more important than ever that the information there is useful. **When you target Android N, by default the time will be hidden** - if you have a time critical notification such as a messaging app, you can re-enable it with `setShowWhen(true)`. In addition, the subtext now supersedes the role of content info and number: number is never shown on Android N devices and only if you target a previous version of Android and don’t include a subtext will content info appear. In all cases, ensure that the subtext is relevant and useful - don’t add an account email address as your subtext if the user only has one account, for example.\n+给出单标题行，这就比以往的信息更加重要且更有用。**当指定 Android N 时,默认情况下，时间会被隐藏** - 如果对时间敏感的通知（比如消息类应用），可以 `setShowWhen(true)` 设置重新启用显示时间。此外，现在 subtext 会取代内容消息和数量的作用：数量是绝不会在 Android N 设备上出现的，除非指定之前的 Android 版本，而且不包含任何 subtext，内容消息将会显示。在所有情况下，都要确保 subtext 是相关且有意义的。例如，如果用户有一个账号，就不要再添加邮箱账户作为 subtext 了。\n \n-Notification actions have also received a redesign and are now in a visually separate bar below the notification.\n+通知收到后的操作也重新设计了，现在视觉上是在通知下方单独的一栏中。\n \n ![](http://ww4.sinaimg.cn/large/a490147fgw1f4w3pwyytkj20b203vdfw.jpg)\n \n-You’ll note that the icons are not present in the new notifications; instead more room is provided for the labels themselves in the constrained space of the notification shade. However, the notification action icons are still required and continue to be used on older versions of Android and on devices such as Android Wear.\n+你会注意到，图标都没有出现在新的通知中；取而代之的是，将通知内有限的空间提供给了标签本身。然而，通知操作图标仍然需要，并继续在旧版本的Android 和设备上使用，如 Android Wear 。","path":"TODO/notifications-in-android-n.md","position":29,"original_position":29,"commit_id":"61a15a5e719baacea4d9e7a39403b945de8de3cd","original_commit_id":"61a15a5e719baacea4d9e7a39403b945de8de3cd","user":{"login":"danke77","id":5564355,"avatar_url":"https://avatars.githubusercontent.com/u/5564355?v=3","gravatar_id":"","url":"https://api.github.com/users/danke77","html_url":"https://github.com/danke77","followers_url":"https://api.github.com/users/danke77/followers","following_url":"https://api.github.com/users/danke77/following{/other_user}","gists_url":"https://api.github.com/users/danke77/gists{/gist_id}","starred_url":"https://api.github.com/users/danke77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danke77/subscriptions","organizations_url":"https://api.github.com/users/danke77/orgs","repos_url":"https://api.github.com/users/danke77/repos","events_url":"https://api.github.com/users/danke77/events{/privacy}","received_events_url":"https://api.github.com/users/danke77/received_events","type":"User","site_admin":false},"body":"然而，通知操作图标仍然需要，并继续在旧版本的Android 和设备上使用，如 Android Wear 。\r\n>然而，在旧版本的 Android 和设备上，通知操作图标仍然需要且被继续使用，例如 Android Wear 。","created_at":"2016-06-26T06:31:58Z","updated_at":"2016-06-26T06:31:58Z","html_url":"https://github.com/xitu/gold-miner/pull/453#discussion_r68498350","pull_request_url":"https://api.github.com/repos/xitu/gold-miner/pulls/453","_links":{"self":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/comments/68498350"},"html":{"href":"https://github.com/xitu/gold-miner/pull/453#discussion_r68498350"},"pull_request":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/453"}}},"pull_request":{"url":"https://api.github.com/repos/xitu/gold-miner/pulls/453","id":74587478,"html_url":"https://github.com/xitu/gold-miner/pull/453","diff_url":"https://github.com/xitu/gold-miner/pull/453.diff","patch_url":"https://github.com/xitu/gold-miner/pull/453.patch","issue_url":"https://api.github.com/repos/xitu/gold-miner/issues/453","number":453,"state":"open","locked":false,"title":"Notifications in Android N","user":{"login":"DeadLion","id":2594907,"avatar_url":"https://avatars.githubusercontent.com/u/2594907?v=3","gravatar_id":"","url":"https://api.github.com/users/DeadLion","html_url":"https://github.com/DeadLion","followers_url":"https://api.github.com/users/DeadLion/followers","following_url":"https://api.github.com/users/DeadLion/following{/other_user}","gists_url":"https://api.github.com/users/DeadLion/gists{/gist_id}","starred_url":"https://api.github.com/users/DeadLion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeadLion/subscriptions","organizations_url":"https://api.github.com/users/DeadLion/orgs","repos_url":"https://api.github.com/users/DeadLion/repos","events_url":"https://api.github.com/users/DeadLion/events{/privacy}","received_events_url":"https://api.github.com/users/DeadLion/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-21T10:31:25Z","updated_at":"2016-06-26T06:31:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"38a43b122286a3a88404abcae2bb582e74280b06","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/xitu/gold-miner/pulls/453/commits","review_comments_url":"https://api.github.com/repos/xitu/gold-miner/pulls/453/comments","review_comment_url":"https://api.github.com/repos/xitu/gold-miner/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xitu/gold-miner/issues/453/comments","statuses_url":"https://api.github.com/repos/xitu/gold-miner/statuses/61a15a5e719baacea4d9e7a39403b945de8de3cd","head":{"label":"DeadLion:translate","ref":"translate","sha":"61a15a5e719baacea4d9e7a39403b945de8de3cd","user":{"login":"DeadLion","id":2594907,"avatar_url":"https://avatars.githubusercontent.com/u/2594907?v=3","gravatar_id":"","url":"https://api.github.com/users/DeadLion","html_url":"https://github.com/DeadLion","followers_url":"https://api.github.com/users/DeadLion/followers","following_url":"https://api.github.com/users/DeadLion/following{/other_user}","gists_url":"https://api.github.com/users/DeadLion/gists{/gist_id}","starred_url":"https://api.github.com/users/DeadLion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeadLion/subscriptions","organizations_url":"https://api.github.com/users/DeadLion/orgs","repos_url":"https://api.github.com/users/DeadLion/repos","events_url":"https://api.github.com/users/DeadLion/events{/privacy}","received_events_url":"https://api.github.com/users/DeadLion/received_events","type":"User","site_admin":false},"repo":{"id":61256435,"name":"gold-miner","full_name":"DeadLion/gold-miner","owner":{"login":"DeadLion","id":2594907,"avatar_url":"https://avatars.githubusercontent.com/u/2594907?v=3","gravatar_id":"","url":"https://api.github.com/users/DeadLion","html_url":"https://github.com/DeadLion","followers_url":"https://api.github.com/users/DeadLion/followers","following_url":"https://api.github.com/users/DeadLion/following{/other_user}","gists_url":"https://api.github.com/users/DeadLion/gists{/gist_id}","starred_url":"https://api.github.com/users/DeadLion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeadLion/subscriptions","organizations_url":"https://api.github.com/users/DeadLion/orgs","repos_url":"https://api.github.com/users/DeadLion/repos","events_url":"https://api.github.com/users/DeadLion/events{/privacy}","received_events_url":"https://api.github.com/users/DeadLion/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DeadLion/gold-miner","description":"掘金翻译计划，翻译掘金上优质的英文文章","fork":true,"url":"https://api.github.com/repos/DeadLion/gold-miner","forks_url":"https://api.github.com/repos/DeadLion/gold-miner/forks","keys_url":"https://api.github.com/repos/DeadLion/gold-miner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DeadLion/gold-miner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DeadLion/gold-miner/teams","hooks_url":"https://api.github.com/repos/DeadLion/gold-miner/hooks","issue_events_url":"https://api.github.com/repos/DeadLion/gold-miner/issues/events{/number}","events_url":"https://api.github.com/repos/DeadLion/gold-miner/events","assignees_url":"https://api.github.com/repos/DeadLion/gold-miner/assignees{/user}","branches_url":"https://api.github.com/repos/DeadLion/gold-miner/branches{/branch}","tags_url":"https://api.github.com/repos/DeadLion/gold-miner/tags","blobs_url":"https://api.github.com/repos/DeadLion/gold-miner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DeadLion/gold-miner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DeadLion/gold-miner/git/refs{/sha}","trees_url":"https://api.github.com/repos/DeadLion/gold-miner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DeadLion/gold-miner/statuses/{sha}","languages_url":"https://api.github.com/repos/DeadLion/gold-miner/languages","stargazers_url":"https://api.github.com/repos/DeadLion/gold-miner/stargazers","contributors_url":"https://api.github.com/repos/DeadLion/gold-miner/contributors","subscribers_url":"https://api.github.com/repos/DeadLion/gold-miner/subscribers","subscription_url":"https://api.github.com/repos/DeadLion/gold-miner/subscription","commits_url":"https://api.github.com/repos/DeadLion/gold-miner/commits{/sha}","git_commits_url":"https://api.github.com/repos/DeadLion/gold-miner/git/commits{/sha}","comments_url":"https://api.github.com/repos/DeadLion/gold-miner/comments{/number}","issue_comment_url":"https://api.github.com/repos/DeadLion/gold-miner/issues/comments{/number}","contents_url":"https://api.github.com/repos/DeadLion/gold-miner/contents/{+path}","compare_url":"https://api.github.com/repos/DeadLion/gold-miner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DeadLion/gold-miner/merges","archive_url":"https://api.github.com/repos/DeadLion/gold-miner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DeadLion/gold-miner/downloads","issues_url":"https://api.github.com/repos/DeadLion/gold-miner/issues{/number}","pulls_url":"https://api.github.com/repos/DeadLion/gold-miner/pulls{/number}","milestones_url":"https://api.github.com/repos/DeadLion/gold-miner/milestones{/number}","notifications_url":"https://api.github.com/repos/DeadLion/gold-miner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DeadLion/gold-miner/labels{/name}","releases_url":"https://api.github.com/repos/DeadLion/gold-miner/releases{/id}","deployments_url":"https://api.github.com/repos/DeadLion/gold-miner/deployments","created_at":"2016-06-16T02:39:33Z","updated_at":"2016-06-16T02:31:35Z","pushed_at":"2016-06-21T10:30:32Z","git_url":"git://github.com/DeadLion/gold-miner.git","ssh_url":"git@github.com:DeadLion/gold-miner.git","clone_url":"https://github.com/DeadLion/gold-miner.git","svn_url":"https://github.com/DeadLion/gold-miner","homepage":"http://gold.xitu.io","size":13400,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"xitu:master","ref":"master","sha":"f095f5acdaa1d374b3e45f1144bf697c8e02081b","user":{"login":"xitu","id":10482599,"avatar_url":"https://avatars.githubusercontent.com/u/10482599?v=3","gravatar_id":"","url":"https://api.github.com/users/xitu","html_url":"https://github.com/xitu","followers_url":"https://api.github.com/users/xitu/followers","following_url":"https://api.github.com/users/xitu/following{/other_user}","gists_url":"https://api.github.com/users/xitu/gists{/gist_id}","starred_url":"https://api.github.com/users/xitu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xitu/subscriptions","organizations_url":"https://api.github.com/users/xitu/orgs","repos_url":"https://api.github.com/users/xitu/repos","events_url":"https://api.github.com/users/xitu/events{/privacy}","received_events_url":"https://api.github.com/users/xitu/received_events","type":"Organization","site_admin":false},"repo":{"id":45512989,"name":"gold-miner","full_name":"xitu/gold-miner","owner":{"login":"xitu","id":10482599,"avatar_url":"https://avatars.githubusercontent.com/u/10482599?v=3","gravatar_id":"","url":"https://api.github.com/users/xitu","html_url":"https://github.com/xitu","followers_url":"https://api.github.com/users/xitu/followers","following_url":"https://api.github.com/users/xitu/following{/other_user}","gists_url":"https://api.github.com/users/xitu/gists{/gist_id}","starred_url":"https://api.github.com/users/xitu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xitu/subscriptions","organizations_url":"https://api.github.com/users/xitu/orgs","repos_url":"https://api.github.com/users/xitu/repos","events_url":"https://api.github.com/users/xitu/events{/privacy}","received_events_url":"https://api.github.com/users/xitu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xitu/gold-miner","description":"掘金翻译计划，翻译掘金上优质的英文文章","fork":false,"url":"https://api.github.com/repos/xitu/gold-miner","forks_url":"https://api.github.com/repos/xitu/gold-miner/forks","keys_url":"https://api.github.com/repos/xitu/gold-miner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xitu/gold-miner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xitu/gold-miner/teams","hooks_url":"https://api.github.com/repos/xitu/gold-miner/hooks","issue_events_url":"https://api.github.com/repos/xitu/gold-miner/issues/events{/number}","events_url":"https://api.github.com/repos/xitu/gold-miner/events","assignees_url":"https://api.github.com/repos/xitu/gold-miner/assignees{/user}","branches_url":"https://api.github.com/repos/xitu/gold-miner/branches{/branch}","tags_url":"https://api.github.com/repos/xitu/gold-miner/tags","blobs_url":"https://api.github.com/repos/xitu/gold-miner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xitu/gold-miner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xitu/gold-miner/git/refs{/sha}","trees_url":"https://api.github.com/repos/xitu/gold-miner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xitu/gold-miner/statuses/{sha}","languages_url":"https://api.github.com/repos/xitu/gold-miner/languages","stargazers_url":"https://api.github.com/repos/xitu/gold-miner/stargazers","contributors_url":"https://api.github.com/repos/xitu/gold-miner/contributors","subscribers_url":"https://api.github.com/repos/xitu/gold-miner/subscribers","subscription_url":"https://api.github.com/repos/xitu/gold-miner/subscription","commits_url":"https://api.github.com/repos/xitu/gold-miner/commits{/sha}","git_commits_url":"https://api.github.com/repos/xitu/gold-miner/git/commits{/sha}","comments_url":"https://api.github.com/repos/xitu/gold-miner/comments{/number}","issue_comment_url":"https://api.github.com/repos/xitu/gold-miner/issues/comments{/number}","contents_url":"https://api.github.com/repos/xitu/gold-miner/contents/{+path}","compare_url":"https://api.github.com/repos/xitu/gold-miner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xitu/gold-miner/merges","archive_url":"https://api.github.com/repos/xitu/gold-miner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xitu/gold-miner/downloads","issues_url":"https://api.github.com/repos/xitu/gold-miner/issues{/number}","pulls_url":"https://api.github.com/repos/xitu/gold-miner/pulls{/number}","milestones_url":"https://api.github.com/repos/xitu/gold-miner/milestones{/number}","notifications_url":"https://api.github.com/repos/xitu/gold-miner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xitu/gold-miner/labels{/name}","releases_url":"https://api.github.com/repos/xitu/gold-miner/releases{/id}","deployments_url":"https://api.github.com/repos/xitu/gold-miner/deployments","created_at":"2015-11-04T03:29:13Z","updated_at":"2016-06-26T04:31:16Z","pushed_at":"2016-06-25T20:19:37Z","git_url":"git://github.com/xitu/gold-miner.git","ssh_url":"git@github.com:xitu/gold-miner.git","clone_url":"https://github.com/xitu/gold-miner.git","svn_url":"https://github.com/xitu/gold-miner","homepage":"http://gold.xitu.io","size":14217,"stargazers_count":2187,"watchers_count":2187,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":418,"mirror_url":null,"open_issues_count":22,"forks":418,"open_issues":22,"watchers":2187,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/453"},"html":{"href":"https://github.com/xitu/gold-miner/pull/453"},"issue":{"href":"https://api.github.com/repos/xitu/gold-miner/issues/453"},"comments":{"href":"https://api.github.com/repos/xitu/gold-miner/issues/453/comments"},"review_comments":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/453/comments"},"review_comment":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/453/commits"},"statuses":{"href":"https://api.github.com/repos/xitu/gold-miner/statuses/61a15a5e719baacea4d9e7a39403b945de8de3cd"}}}}
{"actor":{"display_login":"danke77"}}