{"action":"created","comment":{"url":"https://api.github.com/repos/xitu/gold-miner/pulls/comments/68168758","id":68168758,"diff_hunk":"@@ -1,40 +1,36 @@\n >* 原文链接 : [Android Themes — An in-depth guide](https://medium.com/@Sserra90/android-themes-an-in-depth-guide-f71f9db6e5bf)\n * 原文作者 : [Sérgio Serra](https://medium.com/@Sserra90)\n * 译文出自 : [掘金翻译计划](https://github.com/xitu/gold-miner)\n-* 译者 : \n-* 校对者:\n+* 译者 : [aidistan](https://github.com/aidistan)\n+* 校对者: [shixinzhang](https://github.com/shixinzhang), [a-voyager](https://github.com/a-voyager)\n \n+Theme.AppCompat, Theme.Base.AppCompat, Base.V7.Theme.AppCompat, Base.v11.Theme.AppCompat, Base.v21.Theme.AppCompat, ThemeOverlay, Platform.AppCompat, DeviceDefault, Material, Holo, Classic 等等……\n \n-Theme.AppCompat, Theme.Base.AppCompat, Base.V7.Theme.AppCompat, Base.v11.Theme.AppCompat, Base.v21.Theme.AppCompat, ThemeOverlay, Platform.AppCompat, DeviceDefault, Material, Holo, Classic…\n+当使用安卓主题和支持库时，你可能会遇见以上这些名字，并且好奇：\n \n-If you work with Android themes and support library you have probably at some point seen all those names and asked yourself:\n+- `Base.V{something}`, `Theme.Base.AppCompat`, `Platform.AppCompat` 是什么？\n+- 这些主题是如何组织起来的？\n+- 我应当用哪一个？\n \n-*   What are these Base.V{something}, Theme.Base.AppCompat Platform.AppCompat ?\n-*   How are all these themes organized ?\n-*   Which one should i use ?\n-\n-In this article i’m going to answer those questions and try to clarify for those who don’t know how all of these fit together.\n+在本文中，我将回答上述问题，并尝试阐明这一切是如何工作的。\n \n ### AppCompat v7\n \n-The v7 support library has a theme structure that aims to give the Material appearance in all Android platforms starting in api v7, because different Android platforms have defined different themes, styles and attributes the theme hierarchy is complex and not very intuitive at first. This is where Base.V… and Platform.AppCompat come into play.\n-\n-> There is even a README file in Github that Android developers wrote to explain the theme hierarchy, i recommend you to take a look at it.\n+鉴于不同的安卓平台定义了不同的主题、样式和属性，最初安卓主题的层级非常繁杂，而且很不直观。直到 v7 支持库带来了全新的主题架构以便所有平台上的安卓自 API v7 起能获得一致的材质外观 (Matertial apperance)。`Base.V...` 和 `Platform.AppCompat` 正在是在这个时候被加入了进来。\n \n-<div>[**android/platform_frameworks_support**  \n-_Contribute to platform_frameworks_support development by creating an account on GitHub._github.com](https://github.com/android/platform_frameworks_support/blob/master/v7/appcompat/THEMES.txt \"https://github.com/android/platform_frameworks_support/blob/master/v7/appcompat/THEMES.txt\")[](https://github.com/android/platform_frameworks_support/blob/master/v7/appcompat/THEMES.txt)</div>\n+> 安卓开发者们在 GitHub 上撰写了一篇 [README](https://github.com/android/platform_frameworks_support/blob/master/v7/appcompat/THEMES.txt) 解释主题层级，我推荐你看一看。\n \n-In AppCompat themes are structured in four levels, each level inheriting from the level below:\n+在 `AppCompat` 中，主题被划分为四个层次，每个层次继承自更低一层：\n \n **Level1 → Level2 → Level3 → Level4**\n \n-Besides that, there is a values-v{api} folder for each Android api that needs to define and/or overwrite it’s own styles and attributes:\n+除此之外，每个版本的安卓 API 都有一个 `values-v{api}` 文件夹存放各自需要定义或覆写的样式和属性：","path":"TODO/android-themes-an-in-depth-guide.md","position":43,"original_position":43,"commit_id":"db6783536a6a9a71b1523fb89ead344cc8013255","original_commit_id":"db6783536a6a9a71b1523fb89ead344cc8013255","user":{"login":"shixinzhang","id":17017832,"avatar_url":"https://avatars.githubusercontent.com/u/17017832?v=3","gravatar_id":"","url":"https://api.github.com/users/shixinzhang","html_url":"https://github.com/shixinzhang","followers_url":"https://api.github.com/users/shixinzhang/followers","following_url":"https://api.github.com/users/shixinzhang/following{/other_user}","gists_url":"https://api.github.com/users/shixinzhang/gists{/gist_id}","starred_url":"https://api.github.com/users/shixinzhang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shixinzhang/subscriptions","organizations_url":"https://api.github.com/users/shixinzhang/orgs","repos_url":"https://api.github.com/users/shixinzhang/repos","events_url":"https://api.github.com/users/shixinzhang/events{/privacy}","received_events_url":"https://api.github.com/users/shixinzhang/received_events","type":"User","site_admin":false},"body":"“每个版本的安卓 API 都有一个 ” -> “每个 Android API 版本都有一个对应的”","created_at":"2016-06-23T02:51:02Z","updated_at":"2016-06-23T02:51:02Z","html_url":"https://github.com/xitu/gold-miner/pull/452#discussion_r68168758","pull_request_url":"https://api.github.com/repos/xitu/gold-miner/pulls/452","_links":{"self":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/comments/68168758"},"html":{"href":"https://github.com/xitu/gold-miner/pull/452#discussion_r68168758"},"pull_request":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/452"}}},"pull_request":{"url":"https://api.github.com/repos/xitu/gold-miner/pulls/452","id":74578475,"html_url":"https://github.com/xitu/gold-miner/pull/452","diff_url":"https://github.com/xitu/gold-miner/pull/452.diff","patch_url":"https://github.com/xitu/gold-miner/pull/452.patch","issue_url":"https://api.github.com/repos/xitu/gold-miner/issues/452","number":452,"state":"open","locked":false,"title":"深度讲解 Android 主题","user":{"login":"aidistan","id":3037661,"avatar_url":"https://avatars.githubusercontent.com/u/3037661?v=3","gravatar_id":"","url":"https://api.github.com/users/aidistan","html_url":"https://github.com/aidistan","followers_url":"https://api.github.com/users/aidistan/followers","following_url":"https://api.github.com/users/aidistan/following{/other_user}","gists_url":"https://api.github.com/users/aidistan/gists{/gist_id}","starred_url":"https://api.github.com/users/aidistan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aidistan/subscriptions","organizations_url":"https://api.github.com/users/aidistan/orgs","repos_url":"https://api.github.com/users/aidistan/repos","events_url":"https://api.github.com/users/aidistan/events{/privacy}","received_events_url":"https://api.github.com/users/aidistan/received_events","type":"User","site_admin":false},"body":"#450 初稿，有劳 @shixinzhang @a-voyager 二位了。","created_at":"2016-06-21T09:29:46Z","updated_at":"2016-06-23T02:51:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"11362632d54ee38b697ebbd852a2cc0fe7e24d1b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/xitu/gold-miner/pulls/452/commits","review_comments_url":"https://api.github.com/repos/xitu/gold-miner/pulls/452/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/452/comments","statuses_url":"https://api.github.com/repos/xitu/gold-miner/statuses/db6783536a6a9a71b1523fb89ead344cc8013255","head":{"label":"aidistan:master","ref":"master","sha":"db6783536a6a9a71b1523fb89ead344cc8013255","user":{"login":"aidistan","id":3037661,"avatar_url":"https://avatars.githubusercontent.com/u/3037661?v=3","gravatar_id":"","url":"https://api.github.com/users/aidistan","html_url":"https://github.com/aidistan","followers_url":"https://api.github.com/users/aidistan/followers","following_url":"https://api.github.com/users/aidistan/following{/other_user}","gists_url":"https://api.github.com/users/aidistan/gists{/gist_id}","starred_url":"https://api.github.com/users/aidistan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aidistan/subscriptions","organizations_url":"https://api.github.com/users/aidistan/orgs","repos_url":"https://api.github.com/users/aidistan/repos","events_url":"https://api.github.com/users/aidistan/events{/privacy}","received_events_url":"https://api.github.com/users/aidistan/received_events","type":"User","site_admin":false},"repo":{"id":61604264,"name":"gold-miner","full_name":"aidistan/gold-miner","owner":{"login":"aidistan","id":3037661,"avatar_url":"https://avatars.githubusercontent.com/u/3037661?v=3","gravatar_id":"","url":"https://api.github.com/users/aidistan","html_url":"https://github.com/aidistan","followers_url":"https://api.github.com/users/aidistan/followers","following_url":"https://api.github.com/users/aidistan/following{/other_user}","gists_url":"https://api.github.com/users/aidistan/gists{/gist_id}","starred_url":"https://api.github.com/users/aidistan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aidistan/subscriptions","organizations_url":"https://api.github.com/users/aidistan/orgs","repos_url":"https://api.github.com/users/aidistan/repos","events_url":"https://api.github.com/users/aidistan/events{/privacy}","received_events_url":"https://api.github.com/users/aidistan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aidistan/gold-miner","description":"掘金翻译计划，翻译掘金上优质的英文文章","fork":true,"url":"https://api.github.com/repos/aidistan/gold-miner","forks_url":"https://api.github.com/repos/aidistan/gold-miner/forks","keys_url":"https://api.github.com/repos/aidistan/gold-miner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aidistan/gold-miner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aidistan/gold-miner/teams","hooks_url":"https://api.github.com/repos/aidistan/gold-miner/hooks","issue_events_url":"https://api.github.com/repos/aidistan/gold-miner/issues/events{/number}","events_url":"https://api.github.com/repos/aidistan/gold-miner/events","assignees_url":"https://api.github.com/repos/aidistan/gold-miner/assignees{/user}","branches_url":"https://api.github.com/repos/aidistan/gold-miner/branches{/branch}","tags_url":"https://api.github.com/repos/aidistan/gold-miner/tags","blobs_url":"https://api.github.com/repos/aidistan/gold-miner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aidistan/gold-miner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aidistan/gold-miner/git/refs{/sha}","trees_url":"https://api.github.com/repos/aidistan/gold-miner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aidistan/gold-miner/statuses/{sha}","languages_url":"https://api.github.com/repos/aidistan/gold-miner/languages","stargazers_url":"https://api.github.com/repos/aidistan/gold-miner/stargazers","contributors_url":"https://api.github.com/repos/aidistan/gold-miner/contributors","subscribers_url":"https://api.github.com/repos/aidistan/gold-miner/subscribers","subscription_url":"https://api.github.com/repos/aidistan/gold-miner/subscription","commits_url":"https://api.github.com/repos/aidistan/gold-miner/commits{/sha}","git_commits_url":"https://api.github.com/repos/aidistan/gold-miner/git/commits{/sha}","comments_url":"https://api.github.com/repos/aidistan/gold-miner/comments{/number}","issue_comment_url":"https://api.github.com/repos/aidistan/gold-miner/issues/comments{/number}","contents_url":"https://api.github.com/repos/aidistan/gold-miner/contents/{+path}","compare_url":"https://api.github.com/repos/aidistan/gold-miner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aidistan/gold-miner/merges","archive_url":"https://api.github.com/repos/aidistan/gold-miner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aidistan/gold-miner/downloads","issues_url":"https://api.github.com/repos/aidistan/gold-miner/issues{/number}","pulls_url":"https://api.github.com/repos/aidistan/gold-miner/pulls{/number}","milestones_url":"https://api.github.com/repos/aidistan/gold-miner/milestones{/number}","notifications_url":"https://api.github.com/repos/aidistan/gold-miner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aidistan/gold-miner/labels{/name}","releases_url":"https://api.github.com/repos/aidistan/gold-miner/releases{/id}","deployments_url":"https://api.github.com/repos/aidistan/gold-miner/deployments","created_at":"2016-06-21T05:18:00Z","updated_at":"2016-06-21T04:56:14Z","pushed_at":"2016-06-21T09:25:39Z","git_url":"git://github.com/aidistan/gold-miner.git","ssh_url":"git@github.com:aidistan/gold-miner.git","clone_url":"https://github.com/aidistan/gold-miner.git","svn_url":"https://github.com/aidistan/gold-miner","homepage":"http://gold.xitu.io","size":13572,"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-23T02:38:55Z","pushed_at":"2016-06-23T02:14:10Z","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":14253,"stargazers_count":2080,"watchers_count":2080,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":407,"mirror_url":null,"open_issues_count":20,"forks":407,"open_issues":20,"watchers":2080,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/452"},"html":{"href":"https://github.com/xitu/gold-miner/pull/452"},"issue":{"href":"https://api.github.com/repos/xitu/gold-miner/issues/452"},"comments":{"href":"https://api.github.com/repos/xitu/gold-miner/issues/452/comments"},"review_comments":{"href":"https://api.github.com/repos/xitu/gold-miner/pulls/452/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/452/commits"},"statuses":{"href":"https://api.github.com/repos/xitu/gold-miner/statuses/db6783536a6a9a71b1523fb89ead344cc8013255"}}}}
{"actor":{"display_login":"shixinzhang"}}