payload: {"action":"created","comment":{"url":"https://api.github.com/repos/NativeScript/docs/pulls/comments/341806689","pull_request_review_id":310765490,"id":341806689,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM0MTgwNjY4OQ==","diff_hunk":"@@ -0,0 +1,89 @@\n+---\n+title: Dark Mode\n+description: The article describes the Dark Mode support in NativeScript.\n+position: 51\n+tags: nativescript dark mode, nativescript styling, nativescript css\n+slug: dark-mode\n+---\n+\n+# Overview\n+\n+Android 10 (API level 29) and iOS 13 introduce system-wide dark appearance for all user interface elements, known as [Dark theme](https://developer.android.com/guide/topics/ui/look-and-feel/darktheme) for Android and [Dark Mode](https://developer.apple.com/documentation/appkit/supporting_dark_mode_in_your_interface) for iOS. They have many benefits as to allow users to toggle their interface and focus on the application’s content based on ambient lighting conditions as well as to reduce power usage amount depending on the device's screen technology.\n+\n+## Dark Theme for Android\n+\n+In order to support Dark theme for Android, the application's theme must inherit from a `DayNight` theme as explained [here](https://developer.android.com/guide/topics/ui/look-and-feel/darktheme#supporting_dark_theme_in_your_app).\n+\n+However, Android 10 (API level 29) provides a feature for developers to quickly implement a Dark theme without explicitly setting a `DayNight` theme as mentioned. This features is called [Force Dark](https://developer.android.com/guide/topics/ui/look-and-feel/darktheme#force_dark).\n+\n+Since release 6.2, NativeScript creates new applications with opt-in Force Dark functionality by default to provide support for Dark theme out of the box.\n+\n+The opt-in to Force Dark happens by setting `android:forceDarkAllowed` to `true` in the activity's theme. In particular, every project created by the NativeScript CLI 6.2 or later, contains the snippet below in the `<project>/app/App_Recoures/Android/src/main/res/values/styles.xml` file:\n+\n+```xml\n+    ...\n+\n+    <!-- theme to use AFTER launch screen is loaded-->\n+    <style name=\"AppThemeBase\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n+        <item name=\"android:forceDarkAllowed\">true</item>\n+        <item name=\"toolbarStyle\">@style/NativeScriptToolbarStyle</item>\n+\n+        <item name=\"colorPrimary\">@color/ns_primary</item>\n+        <item name=\"colorPrimaryDark\">@color/ns_primaryDark</item>\n+        <item name=\"colorAccent\">@color/ns_accent</item>\n+    </style>\n+\n+    <style name=\"AppTheme\" parent=\"AppThemeBase\">\n+    </style>\n+\n+    ...\n+```\n+\n+> Important: Make sure to test your application carefully and thoroughly on both Light and Dark system appearance.\n+\n+> Note: If you want to update your project to opt-in to Force Dark, it is needed to put the following line in the `<project>/app/App_Recoures/Android/src/main/res/values/styles.xml` file as shown above: `<item name=\"android:forceDarkAllowed\">true</item>`.\n+\n+## Dark Mode for iOS\n+\n+For iOS, the Dark mode is opt-in by default and every application built with Xcode 11 or above tooling, automatically support both Light and Dark system appearances.","path":"docs/ui/dark-mode.md","position":null,"original_position":48,"commit_id":"3728182404134e8701b628aed6edc3bf828d2fb4","original_commit_id":"15a8466f2b9fc3b2ea87a2bf8b62b57ad0a285d4","user":{"login":"vchimev","id":12251337,"node_id":"MDQ6VXNlcjEyMjUxMzM3","avatar_url":"https://avatars1.githubusercontent.com/u/12251337?v=4","gravatar_id":"","url":"https://api.github.com/users/vchimev","html_url":"https://github.com/vchimev","followers_url":"https://api.github.com/users/vchimev/followers","following_url":"https://api.github.com/users/vchimev/following{/other_user}","gists_url":"https://api.github.com/users/vchimev/gists{/gist_id}","starred_url":"https://api.github.com/users/vchimev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vchimev/subscriptions","organizations_url":"https://api.github.com/users/vchimev/orgs","repos_url":"https://api.github.com/users/vchimev/repos","events_url":"https://api.github.com/users/vchimev/events{/privacy}","received_events_url":"https://api.github.com/users/vchimev/received_events","type":"User","site_admin":false},"body":"Important to note! However, the app might be broken (as the Preview app for example).","created_at":"2019-11-02T10:45:12Z","updated_at":"2019-11-02T10:45:13Z","html_url":"https://github.com/NativeScript/docs/pull/1837#discussion_r341806689","pull_request_url":"https://api.github.com/repos/NativeScript/docs/pulls/1837","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/NativeScript/docs/pulls/comments/341806689"},"html":{"href":"https://github.com/NativeScript/docs/pull/1837#discussion_r341806689"},"pull_request":{"href":"https://api.github.com/repos/NativeScript/docs/pulls/1837"}},"in_reply_to_id":341470728},"pull_request":{"url":"https://api.github.com/repos/NativeScript/docs/pulls/1837","id":334969908,"node_id":"MDExOlB1bGxSZXF1ZXN0MzM0OTY5OTA4","html_url":"https://github.com/NativeScript/docs/pull/1837","diff_url":"https://github.com/NativeScript/docs/pull/1837.diff","patch_url":"https://github.com/NativeScript/docs/pull/1837.patch","issue_url":"https://api.github.com/repos/NativeScript/docs/issues/1837","number":1837,"state":"open","locked":false,"title":"feat: add dark mode article","user":{"login":"vchimev","id":12251337,"node_id":"MDQ6VXNlcjEyMjUxMzM3","avatar_url":"https://avatars1.githubusercontent.com/u/12251337?v=4","gravatar_id":"","url":"https://api.github.com/users/vchimev","html_url":"https://github.com/vchimev","followers_url":"https://api.github.com/users/vchimev/followers","following_url":"https://api.github.com/users/vchimev/following{/other_user}","gists_url":"https://api.github.com/users/vchimev/gists{/gist_id}","starred_url":"https://api.github.com/users/vchimev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vchimev/subscriptions","organizations_url":"https://api.github.com/users/vchimev/orgs","repos_url":"https://api.github.com/users/vchimev/repos","events_url":"https://api.github.com/users/vchimev/events{/privacy}","received_events_url":"https://api.github.com/users/vchimev/received_events","type":"User","site_admin":false},"body":"<!--\r\nWe, the rest of the NativeScript community, thank you for your\r\ncontribution! \r\nTo help the rest of the community review your change, please follow the instructions in the template.\r\n-->\r\n\r\n<!-- PULL REQUEST TEMPLATE -->\r\n<!-- (Update \"[ ]\" to \"[x]\" to check a box) -->\r\n\r\n## PR Checklist\r\n\r\n- [x] The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/CONTRIBUTING.md#commit-messages.\r\n- [x] If there is an issue related with this PR, point it out here.\r\n\r\nDocuments https://github.com/NativeScript/NativeScript/issues/7800.\r\n\r\n","created_at":"2019-10-31T15:22:40Z","updated_at":"2019-11-02T10:45:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e08b93197ee049d47aa58ad6ffd0867446caca61","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1249620783,"node_id":"MDU6TGFiZWwxMjQ5NjIwNzgz","url":"https://api.github.com/repos/NativeScript/docs/labels/cla:%20yes","name":"cla: yes","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/NativeScript/docs/pulls/1837/commits","review_comments_url":"https://api.github.com/repos/NativeScript/docs/pulls/1837/comments","review_comment_url":"https://api.github.com/repos/NativeScript/docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NativeScript/docs/issues/1837/comments","statuses_url":"https://api.github.com/repos/NativeScript/docs/statuses/3728182404134e8701b628aed6edc3bf828d2fb4","head":{"label":"NativeScript:vchimev/dark-mode","ref":"vchimev/dark-mode","sha":"3728182404134e8701b628aed6edc3bf828d2fb4","user":{"login":"NativeScript","id":7392261,"node_id":"MDEyOk9yZ2FuaXphdGlvbjczOTIyNjE=","avatar_url":"https://avatars1.githubusercontent.com/u/7392261?v=4","gravatar_id":"","url":"https://api.github.com/users/NativeScript","html_url":"https://github.com/NativeScript","followers_url":"https://api.github.com/users/NativeScript/followers","following_url":"https://api.github.com/users/NativeScript/following{/other_user}","gists_url":"https://api.github.com/users/NativeScript/gists{/gist_id}","starred_url":"https://api.github.com/users/NativeScript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NativeScript/subscriptions","organizations_url":"https://api.github.com/users/NativeScript/orgs","repos_url":"https://api.github.com/users/NativeScript/repos","events_url":"https://api.github.com/users/NativeScript/events{/privacy}","received_events_url":"https://api.github.com/users/NativeScript/received_events","type":"Organization","site_admin":false},"repo":{"id":20398807,"node_id":"MDEwOlJlcG9zaXRvcnkyMDM5ODgwNw==","name":"docs","full_name":"NativeScript/docs","private":false,"owner":{"login":"NativeScript","id":7392261,"node_id":"MDEyOk9yZ2FuaXphdGlvbjczOTIyNjE=","avatar_url":"https://avatars1.githubusercontent.com/u/7392261?v=4","gravatar_id":"","url":"https://api.github.com/users/NativeScript","html_url":"https://github.com/NativeScript","followers_url":"https://api.github.com/users/NativeScript/followers","following_url":"https://api.github.com/users/NativeScript/following{/other_user}","gists_url":"https://api.github.com/users/NativeScript/gists{/gist_id}","starred_url":"https://api.github.com/users/NativeScript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NativeScript/subscriptions","organizations_url":"https://api.github.com/users/NativeScript/orgs","repos_url":"https://api.github.com/users/NativeScript/repos","events_url":"https://api.github.com/users/NativeScript/events{/privacy}","received_events_url":"https://api.github.com/users/NativeScript/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/NativeScript/docs","description":"Documentation, API reference, and code snippets for NativeScript","fork":false,"url":"https://api.github.com/repos/NativeScript/docs","forks_url":"https://api.github.com/repos/NativeScript/docs/forks","keys_url":"https://api.github.com/repos/NativeScript/docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NativeScript/docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NativeScript/docs/teams","hooks_url":"https://api.github.com/repos/NativeScript/docs/hooks","issue_events_url":"https://api.github.com/repos/NativeScript/docs/issues/events{/number}","events_url":"https://api.github.com/repos/NativeScript/docs/events","assignees_url":"https://api.github.com/repos/NativeScript/docs/assignees{/user}","branches_url":"https://api.github.com/repos/NativeScript/docs/branches{/branch}","tags_url":"https://api.github.com/repos/NativeScript/docs/tags","blobs_url":"https://api.github.com/repos/NativeScript/docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NativeScript/docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NativeScript/docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/NativeScript/docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NativeScript/docs/statuses/{sha}","languages_url":"https://api.github.com/repos/NativeScript/docs/languages","stargazers_url":"https://api.github.com/repos/NativeScript/docs/stargazers","contributors_url":"https://api.github.com/repos/NativeScript/docs/contributors","subscribers_url":"https://api.github.com/repos/NativeScript/docs/subscribers","subscription_url":"https://api.github.com/repos/NativeScript/docs/subscription","commits_url":"https://api.github.com/repos/NativeScript/docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/NativeScript/docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/NativeScript/docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/NativeScript/docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/NativeScript/docs/contents/{+path}","compare_url":"https://api.github.com/repos/NativeScript/docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NativeScript/docs/merges","archive_url":"https://api.github.com/repos/NativeScript/docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NativeScript/docs/downloads","issues_url":"https://api.github.com/repos/NativeScript/docs/issues{/number}","pulls_url":"https://api.github.com/repos/NativeScript/docs/pulls{/number}","milestones_url":"https://api.github.com/repos/NativeScript/docs/milestones{/number}","notifications_url":"https://api.github.com/repos/NativeScript/docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NativeScript/docs/labels{/name}","releases_url":"https://api.github.com/repos/NativeScript/docs/releases{/id}","deployments_url":"https://api.github.com/repos/NativeScript/docs/deployments","created_at":"2014-06-02T09:28:14Z","updated_at":"2019-11-01T06:43:46Z","pushed_at":"2019-11-02T10:33:06Z","git_url":"git://github.com/NativeScript/docs.git","ssh_url":"git@github.com:NativeScript/docs.git","clone_url":"https://github.com/NativeScript/docs.git","svn_url":"https://github.com/NativeScript/docs","homepage":"https://docs.nativescript.org","size":90081,"stargazers_count":400,"watchers_count":400,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":463,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":124,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":463,"open_issues":124,"watchers":400,"default_branch":"master"}},"base":{"label":"NativeScript:master","ref":"master","sha":"3aa3da09f5f82787fa133c7acc368c2ecfabea7c","user":{"login":"NativeScript","id":7392261,"node_id":"MDEyOk9yZ2FuaXphdGlvbjczOTIyNjE=","avatar_url":"https://avatars1.githubusercontent.com/u/7392261?v=4","gravatar_id":"","url":"https://api.github.com/users/NativeScript","html_url":"https://github.com/NativeScript","followers_url":"https://api.github.com/users/NativeScript/followers","following_url":"https://api.github.com/users/NativeScript/following{/other_user}","gists_url":"https://api.github.com/users/NativeScript/gists{/gist_id}","starred_url":"https://api.github.com/users/NativeScript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NativeScript/subscriptions","organizations_url":"https://api.github.com/users/NativeScript/orgs","repos_url":"https://api.github.com/users/NativeScript/repos","events_url":"https://api.github.com/users/NativeScript/events{/privacy}","received_events_url":"https://api.github.com/users/NativeScript/received_events","type":"Organization","site_admin":false},"repo":{"id":20398807,"node_id":"MDEwOlJlcG9zaXRvcnkyMDM5ODgwNw==","name":"docs","full_name":"NativeScript/docs","private":false,"owner":{"login":"NativeScript","id":7392261,"node_id":"MDEyOk9yZ2FuaXphdGlvbjczOTIyNjE=","avatar_url":"https://avatars1.githubusercontent.com/u/7392261?v=4","gravatar_id":"","url":"https://api.github.com/users/NativeScript","html_url":"https://github.com/NativeScript","followers_url":"https://api.github.com/users/NativeScript/followers","following_url":"https://api.github.com/users/NativeScript/following{/other_user}","gists_url":"https://api.github.com/users/NativeScript/gists{/gist_id}","starred_url":"https://api.github.com/users/NativeScript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NativeScript/subscriptions","organizations_url":"https://api.github.com/users/NativeScript/orgs","repos_url":"https://api.github.com/users/NativeScript/repos","events_url":"https://api.github.com/users/NativeScript/events{/privacy}","received_events_url":"https://api.github.com/users/NativeScript/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/NativeScript/docs","description":"Documentation, API reference, and code snippets for NativeScript","fork":false,"url":"https://api.github.com/repos/NativeScript/docs","forks_url":"https://api.github.com/repos/NativeScript/docs/forks","keys_url":"https://api.github.com/repos/NativeScript/docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NativeScript/docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NativeScript/docs/teams","hooks_url":"https://api.github.com/repos/NativeScript/docs/hooks","issue_events_url":"https://api.github.com/repos/NativeScript/docs/issues/events{/number}","events_url":"https://api.github.com/repos/NativeScript/docs/events","assignees_url":"https://api.github.com/repos/NativeScript/docs/assignees{/user}","branches_url":"https://api.github.com/repos/NativeScript/docs/branches{/branch}","tags_url":"https://api.github.com/repos/NativeScript/docs/tags","blobs_url":"https://api.github.com/repos/NativeScript/docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NativeScript/docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NativeScript/docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/NativeScript/docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NativeScript/docs/statuses/{sha}","languages_url":"https://api.github.com/repos/NativeScript/docs/languages","stargazers_url":"https://api.github.com/repos/NativeScript/docs/stargazers","contributors_url":"https://api.github.com/repos/NativeScript/docs/contributors","subscribers_url":"https://api.github.com/repos/NativeScript/docs/subscribers","subscription_url":"https://api.github.com/repos/NativeScript/docs/subscription","commits_url":"https://api.github.com/repos/NativeScript/docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/NativeScript/docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/NativeScript/docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/NativeScript/docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/NativeScript/docs/contents/{+path}","compare_url":"https://api.github.com/repos/NativeScript/docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NativeScript/docs/merges","archive_url":"https://api.github.com/repos/NativeScript/docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NativeScript/docs/downloads","issues_url":"https://api.github.com/repos/NativeScript/docs/issues{/number}","pulls_url":"https://api.github.com/repos/NativeScript/docs/pulls{/number}","milestones_url":"https://api.github.com/repos/NativeScript/docs/milestones{/number}","notifications_url":"https://api.github.com/repos/NativeScript/docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NativeScript/docs/labels{/name}","releases_url":"https://api.github.com/repos/NativeScript/docs/releases{/id}","deployments_url":"https://api.github.com/repos/NativeScript/docs/deployments","created_at":"2014-06-02T09:28:14Z","updated_at":"2019-11-01T06:43:46Z","pushed_at":"2019-11-02T10:33:06Z","git_url":"git://github.com/NativeScript/docs.git","ssh_url":"git@github.com:NativeScript/docs.git","clone_url":"https://github.com/NativeScript/docs.git","svn_url":"https://github.com/NativeScript/docs","homepage":"https://docs.nativescript.org","size":90081,"stargazers_count":400,"watchers_count":400,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":463,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":124,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":463,"open_issues":124,"watchers":400,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NativeScript/docs/pulls/1837"},"html":{"href":"https://github.com/NativeScript/docs/pull/1837"},"issue":{"href":"https://api.github.com/repos/NativeScript/docs/issues/1837"},"comments":{"href":"https://api.github.com/repos/NativeScript/docs/issues/1837/comments"},"review_comments":{"href":"https://api.github.com/repos/NativeScript/docs/pulls/1837/comments"},"review_comment":{"href":"https://api.github.com/repos/NativeScript/docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NativeScript/docs/pulls/1837/commits"},"statuses":{"href":"https://api.github.com/repos/NativeScript/docs/statuses/3728182404134e8701b628aed6edc3bf828d2fb4"}},"author_association":"MEMBER"}}
other: {"actor":{"display_login":"vchimev"}}