├── .gitignore ├── .idea ├── codeStyles │ ├── Project.xml │ └── codeStyleConfig.xml ├── encodings.xml ├── misc.xml ├── modules.xml ├── runConfigurations.xml └── vcs.xml ├── LICENSE ├── README.md ├── build.gradle ├── docs └── Github_Preview.png ├── end ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── ic_launcher-web.png │ ├── java │ └── soup │ │ └── codelab │ │ └── darktheme │ │ └── end │ │ ├── BorderImageView.kt │ │ ├── CodeLabApplication.kt │ │ ├── DarkTheme.kt │ │ ├── GithubActivity.kt │ │ ├── HomeActivity.kt │ │ ├── LottieBindingAdapter.kt │ │ ├── MaterialViewBindingAdapter.kt │ │ ├── MoopActivity.kt │ │ ├── MoopItemUiModel.kt │ │ └── SplashActivity.kt │ └── res │ ├── color │ └── divider.xml │ ├── drawable-night-nodpi │ └── ic_logo_soup.png │ ├── drawable-nodpi │ ├── app_moop.png │ ├── ic_logo_soup.png │ └── ic_profile_soup.png │ ├── drawable │ ├── ic_launcher_background.xml │ ├── ic_launcher_foreground.xml │ ├── ic_round_android.xml │ ├── ic_round_day.xml │ ├── ic_round_daynight.xml │ ├── ic_round_error_outline.xml │ ├── ic_round_favorite.xml │ ├── ic_round_favorite_off.xml │ ├── ic_round_favorite_on.xml │ ├── ic_round_filter.xml │ ├── ic_round_lottie.xml │ ├── ic_round_night.xml │ ├── ic_round_star.xml │ ├── ic_round_up.xml │ ├── moop_bg_error.xml │ ├── moop_bg_moop.xml │ ├── moop_bg_soup.xml │ └── moop_bg_tag.xml │ ├── layout │ ├── github_activity.xml │ ├── home_activity.xml │ ├── home_bottom_sheet.xml │ ├── home_card_moop.xml │ ├── home_card_soup.xml │ ├── moop_activity.xml │ ├── moop_item_error.xml │ ├── moop_item_moop.xml │ ├── moop_item_soup.xml │ ├── moop_item_space.xml │ ├── moop_item_tag.xml │ └── splash_activity.xml │ ├── menu │ └── home_activity.xml │ ├── mipmap-anydpi-v26 │ └── ic_launcher.xml │ ├── mipmap-hdpi │ └── ic_launcher.png │ ├── mipmap-mdpi │ └── ic_launcher.png │ ├── mipmap-xhdpi │ └── ic_launcher.png │ ├── mipmap-xxhdpi │ └── ic_launcher.png │ ├── mipmap-xxxhdpi │ └── ic_launcher.png │ ├── raw │ ├── ic_lottie_favorite_day.json │ └── ic_lottie_favorite_night.json │ ├── values-night │ ├── colors.xml │ └── styles.xml │ ├── values-v29 │ └── themes.xml │ └── values │ ├── attrs.xml │ ├── colors.xml │ ├── strings.xml │ ├── styles.xml │ └── themes.xml ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── settings.gradle └── start ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src └── main ├── AndroidManifest.xml ├── ic_launcher-web.png ├── java └── soup │ └── codelab │ └── darktheme │ ├── BorderImageView.kt │ ├── CodeLabApplication.kt │ ├── DarkTheme.kt │ ├── GithubActivity.kt │ ├── HomeActivity.kt │ ├── LottieBindingAdapter.kt │ ├── MaterialViewBindingAdapter.kt │ ├── MoopActivity.kt │ ├── MoopItemUiModel.kt │ └── SplashActivity.kt └── res ├── color └── divider.xml ├── drawable-night-nodpi └── ic_logo_soup_night.png ├── drawable-nodpi ├── app_moop.png ├── ic_logo_soup.png └── ic_profile_soup.png ├── drawable ├── ic_launcher_background.xml ├── ic_launcher_foreground.xml ├── ic_round_android.xml ├── ic_round_day.xml ├── ic_round_daynight.xml ├── ic_round_error_outline.xml ├── ic_round_favorite.xml ├── ic_round_favorite_off.xml ├── ic_round_favorite_on.xml ├── ic_round_filter.xml ├── ic_round_lottie.xml ├── ic_round_night.xml ├── ic_round_star.xml ├── ic_round_up.xml ├── moop_bg_error.xml ├── moop_bg_moop.xml ├── moop_bg_soup.xml └── moop_bg_tag.xml ├── layout ├── github_activity.xml ├── home_activity.xml ├── home_bottom_sheet.xml ├── home_card_moop.xml ├── home_card_soup.xml ├── moop_activity.xml ├── moop_item_error.xml ├── moop_item_moop.xml ├── moop_item_soup.xml ├── moop_item_space.xml ├── moop_item_tag.xml └── splash_activity.xml ├── menu └── home_activity.xml ├── mipmap-anydpi-v26 └── ic_launcher.xml ├── mipmap-hdpi └── ic_launcher.png ├── mipmap-mdpi └── ic_launcher.png ├── mipmap-xhdpi └── ic_launcher.png ├── mipmap-xxhdpi └── ic_launcher.png ├── mipmap-xxxhdpi └── ic_launcher.png ├── raw ├── ic_lottie_favorite_day.json └── ic_lottie_favorite_night.json ├── values-night ├── colors.xml └── styles.xml ├── values-v29 └── themes.xml └── values ├── attrs.xml ├── colors.xml ├── strings.xml ├── styles.xml └── themes.xml /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the ART/Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | out/ 15 | 16 | # Gradle files 17 | .gradle/ 18 | build/ 19 | 20 | # Local configuration file (sdk path, etc) 21 | local.properties 22 | 23 | # Proguard folder generated by Eclipse 24 | proguard/ 25 | 26 | # Log Files 27 | *.log 28 | 29 | # Android Studio Navigation editor temp files 30 | .navigation/ 31 | 32 | # Android Studio captures folder 33 | captures/ 34 | 35 | # IntelliJ 36 | *.iml 37 | .idea/workspace.xml 38 | .idea/tasks.xml 39 | .idea/gradle.xml 40 | .idea/assetWizardSettings.xml 41 | .idea/dictionaries 42 | .idea/libraries 43 | .idea/caches 44 | 45 | # Keystore files 46 | # Uncomment the following line if you do not want to check your keystore files in. 47 | #*.jks 48 | 49 | # External native build folder generated in Android Studio 2.2 and later 50 | .externalNativeBuild 51 | 52 | # Google Services (e.g. APIs or Firebase) 53 | google-services.json 54 | 55 | # Freeline 56 | freeline.py 57 | freeline/ 58 | freeline_project_description.json 59 | 60 | # fastlane 61 | fastlane/report.xml 62 | fastlane/Preview.html 63 | fastlane/screenshots 64 | fastlane/test_output 65 | fastlane/readme.md 66 | -------------------------------------------------------------------------------- /.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 30 | 182 | -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 🌑 Android DarkTheme (코드랩) 2 | 3 | Android Q에 [DarkTheme](https://developer.android.com/preview/features/darktheme) 설정이 추가된 것을 기념하여 만든 코드랩입니다. 4 | 5 | DarkTheme를 적용하는 방법 중 하나를 가이드합니다. 6 | 7 | 아래는 코드랩의 Start / End 화면입니다. 8 | 9 | 10 | 11 | [PDF 문서](https://speakerdeck.com/fornewid/android-darktheme-kodeuraeb)를 따라 코드랩을 진행하시면 됩니다. 12 | 13 | 문서의 앞부분은 DarkTheme를 미리 적용해보는 방법에 대한 내용이고, 코드랩은 [16 페이지](https://speakerdeck.com/fornewid/android-darktheme-kodeuraeb?slide=16)부터 시작됩니다. 14 | 15 | 총 8단계의 STEP으로 진행이 되며, 각 STEP은 아래와 같은 주석을 지우면서 진행합니다. 16 | 17 | `TODO: STEP# - 제목` 18 | 19 | ### 코드랩 목표: Java/Kotlin 수정하지 않고, 다크테마 적용하기 20 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext.kotlin_version = '1.3.41' 5 | repositories { 6 | google() 7 | jcenter() 8 | 9 | } 10 | dependencies { 11 | classpath 'com.android.tools.build:gradle:3.4.2' 12 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 13 | // NOTE: Do not place your application dependencies here; they belong 14 | // in the individual module build.gradle files 15 | } 16 | } 17 | 18 | allprojects { 19 | repositories { 20 | google() 21 | jcenter() 22 | 23 | } 24 | } 25 | 26 | task clean(type: Delete) { 27 | delete rootProject.buildDir 28 | } 29 | -------------------------------------------------------------------------------- /docs/Github_Preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fornewid/Android-DarkTheme-CodeLab/e25f898dd6d13aea653584bec4e4e2e3e5752657/docs/Github_Preview.png -------------------------------------------------------------------------------- /end/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /end/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | apply plugin: 'kotlin-android' 3 | apply plugin: 'kotlin-android-extensions' 4 | apply plugin: "kotlin-kapt" 5 | 6 | android { 7 | compileSdkVersion 29 8 | buildToolsVersion "29.0.0" 9 | 10 | defaultConfig { 11 | applicationId "soup.codelab.darktheme.end" 12 | minSdkVersion 21 13 | targetSdkVersion 29 14 | versionCode 1 15 | versionName "1.0" 16 | 17 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 18 | } 19 | buildTypes { 20 | release { 21 | minifyEnabled false 22 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 23 | } 24 | } 25 | compileOptions { 26 | sourceCompatibility 1.8 27 | targetCompatibility 1.8 28 | } 29 | dataBinding { 30 | enabled = true 31 | } 32 | } 33 | 34 | dependencies { 35 | implementation fileTree(dir: 'libs', include: ['*.jar']) 36 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 37 | implementation 'androidx.appcompat:appcompat:1.1.0-rc01' 38 | implementation 'com.google.android.material:material:1.1.0-alpha08' 39 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3' 40 | implementation 'com.airbnb.android:lottie:3.0.7' 41 | } 42 | -------------------------------------------------------------------------------- /end/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /end/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /end/src/main/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fornewid/Android-DarkTheme-CodeLab/e25f898dd6d13aea653584bec4e4e2e3e5752657/end/src/main/ic_launcher-web.png -------------------------------------------------------------------------------- /end/src/main/java/soup/codelab/darktheme/end/BorderImageView.kt: -------------------------------------------------------------------------------- 1 | package soup.codelab.darktheme.end 2 | 3 | import android.content.Context 4 | import android.graphics.Canvas 5 | import android.graphics.Color 6 | import android.graphics.Paint 7 | import android.graphics.Rect 8 | import android.util.AttributeSet 9 | import android.widget.ImageView 10 | 11 | class BorderImageView @JvmOverloads constructor( 12 | context: Context, 13 | attrs: AttributeSet? = null, 14 | defStyle: Int = 0 15 | ) : ImageView(context, attrs, defStyle) { 16 | 17 | private val strokePaint = Paint() 18 | private var borderColor: Int = Color.TRANSPARENT 19 | private var borderWidth: Float = 0f 20 | 21 | init { 22 | if (attrs != null) { 23 | val a = context.obtainStyledAttributes(attrs, R.styleable.BorderImageView, defStyle, 0) 24 | try { 25 | borderColor = a.getColor( 26 | R.styleable.BorderImageView_borderColor, 27 | Color.TRANSPARENT 28 | ) 29 | borderWidth = a.getDimension( 30 | R.styleable.BorderImageView_borderWidth, 31 | 0f 32 | ) 33 | strokePaint.apply { 34 | color = borderColor 35 | style = Paint.Style.STROKE 36 | strokeWidth = borderWidth 37 | isAntiAlias = true 38 | } 39 | } finally { 40 | a.recycle() 41 | } 42 | } 43 | } 44 | 45 | override fun draw(canvas: Canvas?) { 46 | super.draw(canvas) 47 | canvas?.borderRectangle(borderWidth.div(2).toInt()) 48 | } 49 | 50 | private fun Canvas.borderRectangle(halfW: Int) = clipBounds.run { 51 | drawRect( 52 | Rect(halfW, halfW, right - halfW, bottom - halfW), 53 | strokePaint 54 | ) 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /end/src/main/java/soup/codelab/darktheme/end/CodeLabApplication.kt: -------------------------------------------------------------------------------- 1 | package soup.codelab.darktheme.end 2 | 3 | import android.app.Application 4 | 5 | class CodeLabApplication : Application() { 6 | 7 | override fun onCreate() { 8 | super.onCreate() 9 | DarkTheme.apply() 10 | } 11 | } -------------------------------------------------------------------------------- /end/src/main/java/soup/codelab/darktheme/end/DarkTheme.kt: -------------------------------------------------------------------------------- 1 | package soup.codelab.darktheme.end 2 | 3 | import android.content.Context 4 | import android.content.res.Configuration 5 | import androidx.appcompat.app.AppCompatDelegate 6 | 7 | object DarkTheme { 8 | 9 | fun apply(enabled: Boolean = false) { 10 | val nightMode = if (enabled) { 11 | AppCompatDelegate.MODE_NIGHT_YES 12 | } else { 13 | AppCompatDelegate.MODE_NIGHT_NO 14 | } 15 | AppCompatDelegate.setDefaultNightMode(nightMode) 16 | } 17 | 18 | fun isEnabled(context: Context): Boolean { 19 | return context.resources.configuration.uiMode and 20 | Configuration.UI_MODE_NIGHT_MASK == 21 | Configuration.UI_MODE_NIGHT_YES 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /end/src/main/java/soup/codelab/darktheme/end/GithubActivity.kt: -------------------------------------------------------------------------------- 1 | package soup.codelab.darktheme.end 2 | 3 | import android.annotation.SuppressLint 4 | import android.os.Bundle 5 | import android.view.LayoutInflater 6 | import android.webkit.WebView 7 | import android.webkit.WebViewClient 8 | import androidx.appcompat.app.AppCompatActivity 9 | import soup.codelab.darktheme.end.databinding.GithubActivityBinding 10 | 11 | class GithubActivity : AppCompatActivity() { 12 | 13 | @SuppressLint("SetJavaScriptEnabled") 14 | override fun onCreate(savedInstanceState: Bundle?) { 15 | super.onCreate(savedInstanceState) 16 | GithubActivityBinding.inflate(LayoutInflater.from(this)).apply { 17 | setContentView(root) 18 | webView.settings.javaScriptEnabled = true 19 | webView.webViewClient = HelpClient() 20 | webView.loadUrl(GITHUB_URL) 21 | } 22 | } 23 | 24 | private class HelpClient : WebViewClient() { 25 | 26 | override fun shouldOverrideUrlLoading(view: WebView, url: String): Boolean { 27 | return url != GITHUB_URL 28 | } 29 | } 30 | 31 | companion object { 32 | 33 | private const val GITHUB_URL = "https://github.com/fornewid/Android-DarkTheme-CodeLab" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /end/src/main/java/soup/codelab/darktheme/end/HomeActivity.kt: -------------------------------------------------------------------------------- 1 | package soup.codelab.darktheme.end 2 | 3 | import android.content.Intent 4 | import android.os.Bundle 5 | import android.view.LayoutInflater 6 | import android.view.Menu 7 | import android.view.MenuItem 8 | import android.view.View 9 | import android.widget.Toast 10 | import androidx.appcompat.app.AppCompatActivity 11 | import com.google.android.material.bottomsheet.BottomSheetBehavior 12 | import com.google.android.material.bottomsheet.BottomSheetBehavior.STATE_COLLAPSED 13 | import com.google.android.material.bottomsheet.BottomSheetBehavior.STATE_HIDDEN 14 | import soup.codelab.darktheme.end.databinding.HomeActivityBinding 15 | 16 | class HomeActivity : AppCompatActivity() { 17 | 18 | private lateinit var bottomSheetBehavior: BottomSheetBehavior 19 | 20 | override fun onCreate(savedInstanceState: Bundle?) { 21 | super.onCreate(savedInstanceState) 22 | HomeActivityBinding.inflate(LayoutInflater.from(this)).apply { 23 | setContentView(root) 24 | 25 | setSupportActionBar(toolbar) 26 | 27 | soupCard.run { 28 | card.setOnClickListener { 29 | navigateToGithub() 30 | } 31 | favoriteButton.setOnClickListener { 32 | val wasSelected = it.isSelected 33 | if (wasSelected) { 34 | 35 | } else { 36 | 37 | } 38 | it.isSelected = wasSelected.not() 39 | } 40 | } 41 | moopCard.run { 42 | card.setOnClickListener { 43 | navigateToMoop() 44 | } 45 | favoriteButton.setMaxFrame(30) 46 | favoriteButton.setOnClickListener { 47 | val wasSelected = it.isSelected 48 | if (wasSelected) { 49 | favoriteButton.speed = -1f 50 | favoriteButton.playAnimation() 51 | } else { 52 | favoriteButton.speed = 1f 53 | favoriteButton.playAnimation() 54 | } 55 | it.isSelected = wasSelected.not() 56 | } 57 | } 58 | 59 | fun View.setSelectedIfDarkTheme() { 60 | isSelected = DarkTheme.isEnabled(context) 61 | } 62 | dayNightToggleButton.setSelectedIfDarkTheme() 63 | dayNightToggleButton.setOnClickListener { 64 | DarkTheme.apply(enabled = it.isSelected.not()) 65 | it.setSelectedIfDarkTheme() 66 | } 67 | 68 | bottomSheetPanel.run { 69 | filterGroup.setOnCheckedChangeListener { group, _ -> 70 | Toast.makeText(group.context, "Filter Changed!", Toast.LENGTH_SHORT).show() 71 | } 72 | bottomSheetBehavior = BottomSheetBehavior.from(root) 73 | bottomSheetBehavior.state = STATE_HIDDEN 74 | } 75 | } 76 | } 77 | 78 | override fun onCreateOptionsMenu(menu: Menu?): Boolean { 79 | menuInflater.inflate(R.menu.home_activity, menu) 80 | return super.onCreateOptionsMenu(menu) 81 | } 82 | 83 | override fun onOptionsItemSelected(item: MenuItem): Boolean { 84 | when (item.itemId) { 85 | R.id.action_filter -> 86 | bottomSheetBehavior.state = STATE_COLLAPSED 87 | } 88 | return super.onOptionsItemSelected(item) 89 | } 90 | 91 | override fun onBackPressed() { 92 | if (bottomSheetBehavior.state != STATE_HIDDEN) { 93 | bottomSheetBehavior.state = STATE_HIDDEN 94 | return 95 | } 96 | super.onBackPressed() 97 | } 98 | 99 | private fun navigateToGithub() { 100 | startActivity(Intent(this, GithubActivity::class.java)) 101 | } 102 | 103 | private fun navigateToMoop() { 104 | startActivity(Intent(this, MoopActivity::class.java)) 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /end/src/main/java/soup/codelab/darktheme/end/LottieBindingAdapter.kt: -------------------------------------------------------------------------------- 1 | package soup.codelab.darktheme.end 2 | 3 | import androidx.annotation.RawRes 4 | import androidx.databinding.BindingAdapter 5 | import com.airbnb.lottie.LottieAnimationView 6 | 7 | /** 8 | * https://github.com/airbnb/lottie-android/issues/1305 9 | */ 10 | @BindingAdapter("lottie_rawResDay", "lottie_rawResNight") 11 | fun setAnimationAsync(view: LottieAnimationView, @RawRes dayRawRes: Int, @RawRes nightRawRes: Int) { 12 | if (DarkTheme.isEnabled(view.context)) { 13 | view.setAnimation(nightRawRes) 14 | } else { 15 | view.setAnimation(dayRawRes) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /end/src/main/java/soup/codelab/darktheme/end/MaterialViewBindingAdapter.kt: -------------------------------------------------------------------------------- 1 | package soup.codelab.darktheme.end 2 | 3 | import android.view.View 4 | import androidx.databinding.BindingAdapter 5 | import com.google.android.material.shape.MaterialShapeDrawable 6 | 7 | @BindingAdapter("elevationOverlaysEnabled") 8 | fun setElevationOverlaysEnabled(view: View, enabled: Boolean) { 9 | view.background = if (enabled) { 10 | MaterialShapeDrawable.createWithElevationOverlay(view.context, view.elevation) 11 | } else { 12 | MaterialShapeDrawable.createWithElevationOverlay(view.context) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /end/src/main/java/soup/codelab/darktheme/end/MoopActivity.kt: -------------------------------------------------------------------------------- 1 | package soup.codelab.darktheme.end 2 | 3 | import android.os.Bundle 4 | import android.view.LayoutInflater 5 | import android.view.ViewGroup 6 | import androidx.appcompat.app.AppCompatActivity 7 | import androidx.databinding.DataBindingUtil 8 | import androidx.databinding.ViewDataBinding 9 | import androidx.recyclerview.widget.RecyclerView 10 | import soup.codelab.darktheme.end.databinding.MoopActivityBinding 11 | 12 | class MoopActivity : AppCompatActivity() { 13 | 14 | override fun onCreate(savedInstanceState: Bundle?) { 15 | super.onCreate(savedInstanceState) 16 | MoopActivityBinding.inflate(LayoutInflater.from(this)).apply { 17 | setContentView(root) 18 | setSupportActionBar(toolbar) 19 | toolbar.setNavigationOnClickListener { 20 | finish() 21 | } 22 | listView.adapter = ListAdapter() 23 | } 24 | } 25 | 26 | class ListAdapter : RecyclerView.Adapter() { 27 | 28 | private val list = MoopItemUiModel.createDummyList() 29 | 30 | init { 31 | notifyDataSetChanged() 32 | } 33 | 34 | override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemViewHolder { 35 | val layoutId = getLayoutIdOf(viewType) 36 | val layoutInflater = LayoutInflater.from(parent.context) 37 | val binding: ViewDataBinding = DataBindingUtil 38 | .inflate(layoutInflater, layoutId, parent, false) 39 | return ItemViewHolder(binding) 40 | } 41 | 42 | override fun getItemCount(): Int { 43 | return list.size 44 | } 45 | 46 | override fun onBindViewHolder(holder: ItemViewHolder, position: Int) { 47 | holder.bind(list.getOrNull(position)) 48 | } 49 | 50 | override fun getItemViewType(position: Int): Int { 51 | return when (list[position]) { 52 | is MoopItemUiModel.Tag -> TYPE_TAG 53 | is MoopItemUiModel.Error -> TYPE_ERROR 54 | is MoopItemUiModel.Moop -> TYPE_MOOP 55 | is MoopItemUiModel.SOUP -> TYPE_SOUP 56 | } 57 | } 58 | 59 | private fun getLayoutIdOf(viewType: Int): Int { 60 | return when (viewType) { 61 | TYPE_TAG -> R.layout.moop_item_tag 62 | TYPE_ERROR -> R.layout.moop_item_error 63 | TYPE_MOOP -> R.layout.moop_item_moop 64 | TYPE_SOUP -> R.layout.moop_item_soup 65 | else -> R.layout.moop_item_space 66 | } 67 | } 68 | 69 | companion object { 70 | private const val TYPE_TAG = 0 71 | private const val TYPE_ERROR = 1 72 | private const val TYPE_MOOP = 2 73 | private const val TYPE_SOUP = 3 74 | } 75 | } 76 | 77 | class ItemViewHolder( 78 | private val binding: ViewDataBinding 79 | ) : RecyclerView.ViewHolder(binding.root) { 80 | 81 | fun bind(item: MoopItemUiModel?) { 82 | binding.setVariable(BR.item, item) 83 | binding.executePendingBindings() 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /end/src/main/java/soup/codelab/darktheme/end/MoopItemUiModel.kt: -------------------------------------------------------------------------------- 1 | package soup.codelab.darktheme.end 2 | 3 | sealed class MoopItemUiModel { 4 | 5 | object Error : MoopItemUiModel() 6 | 7 | class Tag(val message: String) : MoopItemUiModel() 8 | 9 | class Moop(val message: String, val concat: Boolean = false) : MoopItemUiModel() 10 | 11 | class SOUP(val message: CharSequence, val concat: Boolean = false) : MoopItemUiModel() 12 | 13 | companion object { 14 | 15 | fun createDummyList(): List { 16 | return listOf( 17 | SOUP("Android Q has a dark theme! 😍"), 18 | Moop("Um..‍"), 19 | SOUP("May the 'Force dark' be with you. 🤣"), 20 | SOUP("https://material.io/design/color/dark-theme.html", concat = true), 21 | Moop("Not so funny."), 22 | SOUP("Why so serious? 🤔"), 23 | SOUP("I'm not a monster. I just ahead of the curb. 🃏", concat = true), 24 | SOUP("And.. Winter is coming!! with 'Dark theme'. 🙈", concat = true), 25 | SOUP("https://developer.android.com/preview/features/darktheme", concat = true), 26 | Moop("I don't have enough time. 😱"), 27 | Moop("What should I prepare for it?", concat = true), 28 | SOUP("Color, color, and colors. 🌈 Ah! Lottie files are also needed."), 29 | SOUP("Specifically, we need a '-night' resource.", concat = true), 30 | SOUP("https://developer.android.com/guide/topics/resources/providing-resources#AlternativeResources", concat = true), 31 | Moop("Okay, I'll try."), 32 | SOUP("Do or do not. There is no try. - Yoda"), 33 | Tag("여기까지 읽었습니다."), 34 | Moop("🤯🤯🤯🤯🤯"), 35 | SOUP("There is also a material color picker."), 36 | SOUP("https://material.io/design/color/the-color-system.html#tools-for-picking-colors", concat = true), 37 | Error 38 | ) 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /end/src/main/java/soup/codelab/darktheme/end/SplashActivity.kt: -------------------------------------------------------------------------------- 1 | package soup.codelab.darktheme.end 2 | 3 | import android.content.Intent 4 | import android.os.Bundle 5 | import androidx.appcompat.app.AppCompatActivity 6 | 7 | class SplashActivity : AppCompatActivity() { 8 | 9 | override fun onCreate(savedInstanceState: Bundle?) { 10 | super.onCreate(savedInstanceState) 11 | setContentView(R.layout.splash_activity) 12 | window.decorView.postDelayed( 13 | { 14 | startActivity(Intent(this, HomeActivity::class.java)) 15 | finish() 16 | }, 300 17 | ) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /end/src/main/res/color/divider.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /end/src/main/res/drawable-night-nodpi/ic_logo_soup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fornewid/Android-DarkTheme-CodeLab/e25f898dd6d13aea653584bec4e4e2e3e5752657/end/src/main/res/drawable-night-nodpi/ic_logo_soup.png -------------------------------------------------------------------------------- /end/src/main/res/drawable-nodpi/app_moop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fornewid/Android-DarkTheme-CodeLab/e25f898dd6d13aea653584bec4e4e2e3e5752657/end/src/main/res/drawable-nodpi/app_moop.png -------------------------------------------------------------------------------- /end/src/main/res/drawable-nodpi/ic_logo_soup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fornewid/Android-DarkTheme-CodeLab/e25f898dd6d13aea653584bec4e4e2e3e5752657/end/src/main/res/drawable-nodpi/ic_logo_soup.png -------------------------------------------------------------------------------- /end/src/main/res/drawable-nodpi/ic_profile_soup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fornewid/Android-DarkTheme-CodeLab/e25f898dd6d13aea653584bec4e4e2e3e5752657/end/src/main/res/drawable-nodpi/ic_profile_soup.png -------------------------------------------------------------------------------- /end/src/main/res/drawable/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /end/src/main/res/drawable/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 17 | 20 | 21 | 29 | 32 | 33 | 34 | 40 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /end/src/main/res/drawable/ic_round_android.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /end/src/main/res/drawable/ic_round_day.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /end/src/main/res/drawable/ic_round_daynight.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /end/src/main/res/drawable/ic_round_error_outline.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /end/src/main/res/drawable/ic_round_favorite.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /end/src/main/res/drawable/ic_round_favorite_off.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /end/src/main/res/drawable/ic_round_favorite_on.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /end/src/main/res/drawable/ic_round_filter.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /end/src/main/res/drawable/ic_round_lottie.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /end/src/main/res/drawable/ic_round_night.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /end/src/main/res/drawable/ic_round_star.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /end/src/main/res/drawable/ic_round_up.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /end/src/main/res/drawable/moop_bg_error.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /end/src/main/res/drawable/moop_bg_moop.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | -------------------------------------------------------------------------------- /end/src/main/res/drawable/moop_bg_soup.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | -------------------------------------------------------------------------------- /end/src/main/res/drawable/moop_bg_tag.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /end/src/main/res/layout/github_activity.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /end/src/main/res/layout/home_activity.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 15 | 16 | 23 | 24 | 25 | 26 | 31 | 32 | 44 | 45 | 55 | 56 | 57 | 58 | 65 | 66 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /end/src/main/res/layout/home_bottom_sheet.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | 28 | 29 | 41 | 42 | 48 | 49 | 55 | 56 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /end/src/main/res/layout/home_card_moop.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 17 | 18 | 23 | 24 | 33 | 34 | 49 | 50 | 64 | 65 | 74 | 75 | 86 | 87 | 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /end/src/main/res/layout/home_card_soup.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 18 | 19 | 28 | 29 | 44 | 45 | 59 | 60 | 69 | 70 | 80 | 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /end/src/main/res/layout/moop_activity.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 15 | 16 | 23 | 24 | 25 | 26 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /end/src/main/res/layout/moop_item_error.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 12 | 13 | 14 | 17 | 18 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /end/src/main/res/layout/moop_item_moop.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 14 | 15 | 16 | 23 | 24 | 37 | 38 | 52 | 53 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /end/src/main/res/layout/moop_item_soup.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 14 | 15 | 16 | 23 | 24 | 38 | 39 | 54 | 55 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /end/src/main/res/layout/moop_item_space.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | 16 | -------------------------------------------------------------------------------- /end/src/main/res/layout/moop_item_tag.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 12 | 13 | 14 | 17 | 18 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /end/src/main/res/layout/splash_activity.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 | -------------------------------------------------------------------------------- /end/src/main/res/menu/home_activity.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | -------------------------------------------------------------------------------- /end/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /end/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fornewid/Android-DarkTheme-CodeLab/e25f898dd6d13aea653584bec4e4e2e3e5752657/end/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /end/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fornewid/Android-DarkTheme-CodeLab/e25f898dd6d13aea653584bec4e4e2e3e5752657/end/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /end/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fornewid/Android-DarkTheme-CodeLab/e25f898dd6d13aea653584bec4e4e2e3e5752657/end/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /end/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fornewid/Android-DarkTheme-CodeLab/e25f898dd6d13aea653584bec4e4e2e3e5752657/end/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /end/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fornewid/Android-DarkTheme-CodeLab/e25f898dd6d13aea653584bec4e4e2e3e5752657/end/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /end/src/main/res/raw/ic_lottie_favorite_night.json: -------------------------------------------------------------------------------- 1 | {"v":"5.1.18","fr":30,"ip":0,"op":30,"w":56,"h":56,"nm":"点赞信息流全屏","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"“moment_tool_like_sel”轮廓","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[28,28,0],"ix":2},"a":{"a":0,"k":[16,16,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.91,-0.563],[0.422,-0.428],[0.46,0.286],[1.233,0],[0.329,-0.033],[0.947,-1.021],[0.144,-1.793],[0,0],[-1.62,-1.806],[-3.73,-2.653],[0,0],[-0.256,0.115],[0,0],[0,0],[0,0],[-1.504,1.683],[-0.144,1.92],[0,0],[0,0],[1.078,1.153],[1.272,0.13],[0.349,0]],"o":[[-0.462,0.287],[-0.429,-0.437],[-0.908,-0.561],[-0.338,0],[-1.276,0.131],[-1.076,1.151],[0,0],[0.146,1.979],[1.524,1.679],[0,0],[0.228,0.164],[0,0],[0,0],[0,0],[3.746,-2.656],[1.62,-1.805],[0,0],[0,0],[-0.145,-1.793],[-0.937,-1.012],[-0.319,-0.033],[-1.24,0]],"v":[[1.292,-8.986],[-0.003,-7.93],[-1.291,-8.986],[-4.452,-9.807],[-5.443,-9.759],[-8.924,-7.951],[-10.781,-3.445],[-10.784,-2.217],[-8.206,3.254],[-0.617,9.506],[-0.471,9.612],[0.311,9.692],[0.409,9.648],[0.526,9.582],[0.623,9.517],[8.206,3.253],[10.781,-2.158],[10.784,-3.382],[10.781,-3.445],[8.922,-7.953],[5.443,-9.759],[4.452,-9.807]],"c":true},"ix":2},"nm":"heart","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"gf","o":{"a":0,"k":100,"ix":10},"r":1,"g":{"p":3,"k":{"a":0,"k":[0,1,0.376,0.306,0.5,0.967,0.257,0.335,1,0.933,0.137,0.365],"ix":9}},"s":{"a":0,"k":[-0.024,-10.002],"ix":5},"e":{"a":0,"k":[-0.043,9.753],"ix":6},"t":1,"nm":"gradient 1","mn":"ADBE Vector Graphic - G-Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[16,16.269],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667],"y":[1,1]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p667_1_0p167_0p167","0p667_1_0p167_0p167"],"t":1,"s":[0,0],"e":[135,135]},{"i":{"x":[0.667,0.667],"y":[1,1]},"o":{"x":[0.333,0.333],"y":[0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0"],"t":9,"s":[135,135],"e":[100,100]},{"t":15}],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":1,"s":[50],"e":[100]},{"t":9}],"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"group1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":1,"op":30,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"“moment_tool_like_nor”轮廓","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[28,28,0],"ix":2},"a":{"a":0,"k":[16,16,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0.955,1.023],[1.075,0.11],[0.293,0],[0.781,-0.484],[0.489,-0.571],[0.674,0.418],[1.086,0],[0.326,-0.033],[0.826,-0.89],[0.13,-1.616],[0,0],[-1.509,-1.681],[-3.681,-2.617],[0,0],[0,0],[0,0],[-1.455,1.628],[-0.13,1.737]],"o":[[-0.13,-1.616],[-0.815,-0.879],[-0.314,-0.033],[-1.097,0],[-0.674,0.418],[-0.489,-0.56],[-0.781,-0.484],[-0.282,0],[-1.074,0.11],[-0.955,1.023],[0,0],[0.13,1.737],[1.476,1.628],[0,0],[0,0],[0,0],[3.691,-2.617],[1.51,-1.681],[0,0]],"v":[[10,-3.359],[8.35,-7.395],[5.363,-8.956],[4.452,-9],[1.705,-8.296],[0,-6.746],[-1.705,-8.296],[-4.452,-9],[-5.364,-8.956],[-8.35,-7.395],[-10,-3.359],[-10,-2.193],[-7.622,2.754],[-0.163,8.89],[-0.011,9],[0.087,8.956],[0.185,8.89],[7.622,2.754],[10,-2.193]],"c":true},"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":1.5,"ix":5},"lc":2,"lj":2,"nm":"描边 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[16,16.246],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"组 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":5,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"心7","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":26,"s":[40],"e":[0]},{"t":30}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0.167},"n":"0p667_1_0p167_0p167","t":7,"s":[28,28,0],"e":[26.128,42.625,0],"to":[3.60302758216858,10.5437002182007,0],"ti":[2.72250151634216,4.99742412567139,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.333,"y":0},"n":"0p833_0p833_0p333_0","t":16,"s":[26.128,42.625,0],"e":[29,4.428,0],"to":[-2.9661111831665,-5.44459390640259,0],"ti":[6.73637723922729,7.55015087127686,0]},{"t":30}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.91,-0.563],[0.422,-0.428],[0.46,0.286],[1.233,0],[0.329,-0.033],[0.947,-1.021],[0.144,-1.793],[0,0],[-1.62,-1.806],[-3.73,-2.653],[0,0],[-0.256,0.115],[0,0],[0,0],[0,0],[-1.504,1.683],[-0.144,1.92],[0,0],[0,0],[1.078,1.153],[1.272,0.13],[0.349,0]],"o":[[-0.462,0.287],[-0.429,-0.437],[-0.908,-0.561],[-0.338,0],[-1.276,0.131],[-1.076,1.151],[0,0],[0.146,1.979],[1.524,1.679],[0,0],[0.228,0.164],[0,0],[0,0],[0,0],[3.746,-2.656],[1.62,-1.805],[0,0],[0,0],[-0.145,-1.793],[-0.937,-1.012],[-0.319,-0.033],[-1.24,0]],"v":[[1.292,-8.986],[-0.003,-7.93],[-1.291,-8.986],[-4.452,-9.807],[-5.443,-9.759],[-8.924,-7.951],[-10.781,-3.445],[-10.784,-2.217],[-8.206,3.254],[-0.617,9.506],[-0.471,9.612],[0.311,9.692],[0.409,9.648],[0.526,9.582],[0.623,9.517],[8.206,3.253],[10.781,-2.158],[10.784,-3.382],[10.781,-3.445],[8.922,-7.953],[5.443,-9.759],[4.452,-9.807]],"c":true},"ix":2},"nm":"路径 2","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.933333337307,0.29411765933,0.29411765933,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[25,25],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"组 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":7,"op":30,"st":-5,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"心6","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":26,"s":[40],"e":[0]},{"t":30}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0.167},"n":"0p667_1_0p167_0p167","t":7,"s":[28,28,0],"e":[13.128,31.625,0],"to":[-3.64697241783142,17.293701171875,0],"ti":[-0.18114750087261,7.30151987075806,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.333,"y":0},"n":"0p833_0p833_0p333_0","t":16,"s":[13.128,31.625,0],"e":[5,4.428,0],"to":[0.30469539761543,-12.2813701629639,0],"ti":[6.73637723922729,7.55015087127686,0]},{"t":30}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.91,-0.563],[0.422,-0.428],[0.46,0.286],[1.233,0],[0.329,-0.033],[0.947,-1.021],[0.144,-1.793],[0,0],[-1.62,-1.806],[-3.73,-2.653],[0,0],[-0.256,0.115],[0,0],[0,0],[0,0],[-1.504,1.683],[-0.144,1.92],[0,0],[0,0],[1.078,1.153],[1.272,0.13],[0.349,0]],"o":[[-0.462,0.287],[-0.429,-0.437],[-0.908,-0.561],[-0.338,0],[-1.276,0.131],[-1.076,1.151],[0,0],[0.146,1.979],[1.524,1.679],[0,0],[0.228,0.164],[0,0],[0,0],[0,0],[3.746,-2.656],[1.62,-1.805],[0,0],[0,0],[-0.145,-1.793],[-0.937,-1.012],[-0.319,-0.033],[-1.24,0]],"v":[[1.292,-8.986],[-0.003,-7.93],[-1.291,-8.986],[-4.452,-9.807],[-5.443,-9.759],[-8.924,-7.951],[-10.781,-3.445],[-10.784,-2.217],[-8.206,3.254],[-0.617,9.506],[-0.471,9.612],[0.311,9.692],[0.409,9.648],[0.526,9.582],[0.623,9.517],[8.206,3.253],[10.781,-2.158],[10.784,-3.382],[10.781,-3.445],[8.922,-7.953],[5.443,-9.759],[4.452,-9.807]],"c":true},"ix":2},"nm":"路径 2","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.933333337307,0.29411765933,0.29411765933,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[25,25],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"组 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":7,"op":30,"st":-5,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"心5","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":26,"s":[40],"e":[0]},{"t":30}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0.167},"n":"0p667_1_0p167_0p167","t":7,"s":[28,28,0],"e":[18.128,47.625,0],"to":[2.10302758216858,14.7937002182007,0],"ti":[3.38955783843994,3.77145504951477,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.333,"y":0},"n":"0p833_0p833_0p333_0","t":16,"s":[18.128,47.625,0],"e":[7,23.428,0],"to":[-5.63568830490112,-6.27065420150757,0],"ti":[5.98637723922729,4.55015087127686,0]},{"t":30}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.91,-0.563],[0.422,-0.428],[0.46,0.286],[1.233,0],[0.329,-0.033],[0.947,-1.021],[0.144,-1.793],[0,0],[-1.62,-1.806],[-3.73,-2.653],[0,0],[-0.256,0.115],[0,0],[0,0],[0,0],[-1.504,1.683],[-0.144,1.92],[0,0],[0,0],[1.078,1.153],[1.272,0.13],[0.349,0]],"o":[[-0.462,0.287],[-0.429,-0.437],[-0.908,-0.561],[-0.338,0],[-1.276,0.131],[-1.076,1.151],[0,0],[0.146,1.979],[1.524,1.679],[0,0],[0.228,0.164],[0,0],[0,0],[0,0],[3.746,-2.656],[1.62,-1.805],[0,0],[0,0],[-0.145,-1.793],[-0.937,-1.012],[-0.319,-0.033],[-1.24,0]],"v":[[1.292,-8.986],[-0.003,-7.93],[-1.291,-8.986],[-4.452,-9.807],[-5.443,-9.759],[-8.924,-7.951],[-10.781,-3.445],[-10.784,-2.217],[-8.206,3.254],[-0.617,9.506],[-0.471,9.612],[0.311,9.692],[0.409,9.648],[0.526,9.582],[0.623,9.517],[8.206,3.253],[10.781,-2.158],[10.784,-3.382],[10.781,-3.445],[8.922,-7.953],[5.443,-9.759],[4.452,-9.807]],"c":true},"ix":2},"nm":"路径 2","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.933333337307,0.29411765933,0.29411765933,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[25,25],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"组 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":7,"op":30,"st":-5,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"心4","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":26,"s":[40],"e":[0]},{"t":30}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0.167},"n":"0p667_1_0p167_0p167","t":7,"s":[28,28,0],"e":[50.128,46.625,0],"to":[4.85302734375,14.0437002182007,0],"ti":[-5.60763740539551,5.61827898025513,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.333,"y":0},"n":"0p833_0p833_0p333_0","t":16,"s":[50.128,46.625,0],"e":[45,14.428,0],"to":[7.0543966293335,-7.06778335571289,0],"ti":[8.48637676239014,8.05015087127686,0]},{"t":30}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.91,-0.563],[0.422,-0.428],[0.46,0.286],[1.233,0],[0.329,-0.033],[0.947,-1.021],[0.144,-1.793],[0,0],[-1.62,-1.806],[-3.73,-2.653],[0,0],[-0.256,0.115],[0,0],[0,0],[0,0],[-1.504,1.683],[-0.144,1.92],[0,0],[0,0],[1.078,1.153],[1.272,0.13],[0.349,0]],"o":[[-0.462,0.287],[-0.429,-0.437],[-0.908,-0.561],[-0.338,0],[-1.276,0.131],[-1.076,1.151],[0,0],[0.146,1.979],[1.524,1.679],[0,0],[0.228,0.164],[0,0],[0,0],[0,0],[3.746,-2.656],[1.62,-1.805],[0,0],[0,0],[-0.145,-1.793],[-0.937,-1.012],[-0.319,-0.033],[-1.24,0]],"v":[[1.292,-8.986],[-0.003,-7.93],[-1.291,-8.986],[-4.452,-9.807],[-5.443,-9.759],[-8.924,-7.951],[-10.781,-3.445],[-10.784,-2.217],[-8.206,3.254],[-0.617,9.506],[-0.471,9.612],[0.311,9.692],[0.409,9.648],[0.526,9.582],[0.623,9.517],[8.206,3.253],[10.781,-2.158],[10.784,-3.382],[10.781,-3.445],[8.922,-7.953],[5.443,-9.759],[4.452,-9.807]],"c":true},"ix":2},"nm":"路径 2","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.933333337307,0.29411765933,0.29411765933,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[25,25],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"组 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":7,"op":30,"st":-5,"bm":0},{"ddd":0,"ind":7,"ty":4,"nm":"心3","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":26,"s":[40],"e":[0]},{"t":30}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0.167},"n":"0p667_1_0p167_0p167","t":7,"s":[28,28,0],"e":[40.128,48.625,0],"to":[4.85302734375,14.0437002182007,0],"ti":[-7.90744161605835,0.69500201940536,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.333,"y":0},"n":"0p833_0p833_0p333_0","t":16,"s":[40.128,48.625,0],"e":[45,21.428,0],"to":[9.3043966293335,-0.81778341531754,0],"ti":[-8.76362323760986,13.5501508712769,0]},{"t":30}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.91,-0.563],[0.422,-0.428],[0.46,0.286],[1.233,0],[0.329,-0.033],[0.947,-1.021],[0.144,-1.793],[0,0],[-1.62,-1.806],[-3.73,-2.653],[0,0],[-0.256,0.115],[0,0],[0,0],[0,0],[-1.504,1.683],[-0.144,1.92],[0,0],[0,0],[1.078,1.153],[1.272,0.13],[0.349,0]],"o":[[-0.462,0.287],[-0.429,-0.437],[-0.908,-0.561],[-0.338,0],[-1.276,0.131],[-1.076,1.151],[0,0],[0.146,1.979],[1.524,1.679],[0,0],[0.228,0.164],[0,0],[0,0],[0,0],[3.746,-2.656],[1.62,-1.805],[0,0],[0,0],[-0.145,-1.793],[-0.937,-1.012],[-0.319,-0.033],[-1.24,0]],"v":[[1.292,-8.986],[-0.003,-7.93],[-1.291,-8.986],[-4.452,-9.807],[-5.443,-9.759],[-8.924,-7.951],[-10.781,-3.445],[-10.784,-2.217],[-8.206,3.254],[-0.617,9.506],[-0.471,9.612],[0.311,9.692],[0.409,9.648],[0.526,9.582],[0.623,9.517],[8.206,3.253],[10.781,-2.158],[10.784,-3.382],[10.781,-3.445],[8.922,-7.953],[5.443,-9.759],[4.452,-9.807]],"c":true},"ix":2},"nm":"路径 2","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.933333337307,0.29411765933,0.29411765933,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[25,25],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"组 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":7,"op":30,"st":-5,"bm":0},{"ddd":0,"ind":8,"ty":4,"nm":"心2","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":26,"s":[40],"e":[0]},{"t":30}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0.167},"n":"0p667_1_0p167_0p167","t":7,"s":[28,28,0],"e":[48.128,31.625,0],"to":[4.85302734375,14.0437002182007,0],"ti":[1.79182434082031,7.73304748535156,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.333,"y":0},"n":"0p833_0p833_0p333_0","t":16,"s":[48.128,31.625,0],"e":[51,4.428,0],"to":[-1.69560348987579,-7.31778335571289,0],"ti":[-6.01362276077271,10.8001508712769,0]},{"t":30}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.91,-0.563],[0.422,-0.428],[0.46,0.286],[1.233,0],[0.329,-0.033],[0.947,-1.021],[0.144,-1.793],[0,0],[-1.62,-1.806],[-3.73,-2.653],[0,0],[-0.256,0.115],[0,0],[0,0],[0,0],[-1.504,1.683],[-0.144,1.92],[0,0],[0,0],[1.078,1.153],[1.272,0.13],[0.349,0]],"o":[[-0.462,0.287],[-0.429,-0.437],[-0.908,-0.561],[-0.338,0],[-1.276,0.131],[-1.076,1.151],[0,0],[0.146,1.979],[1.524,1.679],[0,0],[0.228,0.164],[0,0],[0,0],[0,0],[3.746,-2.656],[1.62,-1.805],[0,0],[0,0],[-0.145,-1.793],[-0.937,-1.012],[-0.319,-0.033],[-1.24,0]],"v":[[1.292,-8.986],[-0.003,-7.93],[-1.291,-8.986],[-4.452,-9.807],[-5.443,-9.759],[-8.924,-7.951],[-10.781,-3.445],[-10.784,-2.217],[-8.206,3.254],[-0.617,9.506],[-0.471,9.612],[0.311,9.692],[0.409,9.648],[0.526,9.582],[0.623,9.517],[8.206,3.253],[10.781,-2.158],[10.784,-3.382],[10.781,-3.445],[8.922,-7.953],[5.443,-9.759],[4.452,-9.807]],"c":true},"ix":2},"nm":"路径 2","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.933333337307,0.29411765933,0.29411765933,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[25,25],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"组 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":7,"op":30,"st":-5,"bm":0},{"ddd":0,"ind":9,"ty":4,"nm":"心1","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":26,"s":[40],"e":[0]},{"t":30}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0.167},"n":"0p667_1_0p167_0p167","t":7,"s":[28,28,0],"e":[7.128,42.625,0],"to":[-4.14697265625,20.043701171875,0],"ti":[3.09718728065491,6.84342432022095,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.333,"y":0},"n":"0p833_0p833_0p333_0","t":16,"s":[7.128,42.625,0],"e":[18,10.428,0],"to":[-4.29182434082031,-9.48304748535156,0],"ti":[1.48637712001801,17.8001499176025,0]},{"t":30}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.91,-0.563],[0.422,-0.428],[0.46,0.286],[1.233,0],[0.329,-0.033],[0.947,-1.021],[0.144,-1.793],[0,0],[-1.62,-1.806],[-3.73,-2.653],[0,0],[-0.256,0.115],[0,0],[0,0],[0,0],[-1.504,1.683],[-0.144,1.92],[0,0],[0,0],[1.078,1.153],[1.272,0.13],[0.349,0]],"o":[[-0.462,0.287],[-0.429,-0.437],[-0.908,-0.561],[-0.338,0],[-1.276,0.131],[-1.076,1.151],[0,0],[0.146,1.979],[1.524,1.679],[0,0],[0.228,0.164],[0,0],[0,0],[0,0],[3.746,-2.656],[1.62,-1.805],[0,0],[0,0],[-0.145,-1.793],[-0.937,-1.012],[-0.319,-0.033],[-1.24,0]],"v":[[1.292,-8.986],[-0.003,-7.93],[-1.291,-8.986],[-4.452,-9.807],[-5.443,-9.759],[-8.924,-7.951],[-10.781,-3.445],[-10.784,-2.217],[-8.206,3.254],[-0.617,9.506],[-0.471,9.612],[0.311,9.692],[0.409,9.648],[0.526,9.582],[0.623,9.517],[8.206,3.253],[10.781,-2.158],[10.784,-3.382],[10.781,-3.445],[8.922,-7.953],[5.443,-9.759],[4.452,-9.807]],"c":true},"ix":2},"nm":"路径 2","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.933333337307,0.29411765933,0.29411765933,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[25,25],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"组 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":7,"op":30,"st":-5,"bm":0}],"markers":[]} -------------------------------------------------------------------------------- /end/src/main/res/values-night/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #121212 5 | #000000 6 | #00c300 7 | #202020 8 | #ffffff 9 | #ffffff 10 | #121212 11 | #1Affffff 12 | #ffffff 13 | #1Affffff 14 | #33ffffff 15 | #ddffffff 16 | #ff7f77 17 | #202020 18 | 19 | 20 | -------------------------------------------------------------------------------- /end/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | 15 | 18 | 19 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /end/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /end/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #00c300 5 | #00b300 6 | #00c300 7 | #ffffff 8 | #000000 9 | #000000 10 | #eeeeee 11 | #1A000000 12 | #121212 13 | #1A000000 14 | #33000000 15 | #dd000000 16 | #ee4b4b 17 | #ffffff 18 | 19 | 20 | -------------------------------------------------------------------------------- /end/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | DarkTheme CodeLab 3 | Home 4 | Filter 5 | Github 6 | Moop 7 | 8 | -------------------------------------------------------------------------------- /end/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | 15 | 18 | 19 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /end/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14 | 15 | 18 | 19 | 8 | --> 9 | 10 | -------------------------------------------------------------------------------- /start/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /start/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #00c300 5 | #00b300 6 | #00c300 7 | #ffffff 8 | #000000 9 | #000000 10 | #eeeeee 11 | #1A000000 12 | #121212 13 | #1A000000 14 | #33000000 15 | #dd000000 16 | #ee4b4b 17 | #ffffff 18 | 19 | 20 | -------------------------------------------------------------------------------- /start/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | DarkTheme CodeLab 3 | Home 4 | Filter 5 | Github 6 | Moop 7 | 8 | -------------------------------------------------------------------------------- /start/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | 15 | 18 | 19 | 31 | --> 32 | 33 | -------------------------------------------------------------------------------- /start/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | --------------------------------------------------------------------------------