Skip to content

Commit

Permalink
feat: Update App theme colors
Browse files Browse the repository at this point in the history
Signed-off-by: Hu Shenghao <[email protected]>
  • Loading branch information
hushenghao committed Nov 6, 2024
1 parent 1afa1b7 commit bd129f8
Show file tree
Hide file tree
Showing 24 changed files with 911 additions and 290 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### v3.2.0

- Add 'Animator duration scale' alert
- Update App theme colors
- Project modularization
- Upgrade project dependencies

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### v3.2.0

- 添加 ‘Animator 时长缩放’ 检查
- 更新 App 主题色
- 项目模块化
- 升级项目依赖项

Expand Down
21 changes: 0 additions & 21 deletions basic/src/main/java/com/dede/basic/ContextExt.kt
Original file line number Diff line number Diff line change
Expand Up @@ -94,24 +94,3 @@ fun Context.getConfigurationLocales(): LocaleListCompat {
val localeConfig = ContextCompat.getContextForLanguage(this).resources.configuration
return ConfigurationCompat.getLocales(localeConfig)
}

fun Context.createScaleWrapper(scale: Float): Context {
val override = Configuration(resources.configuration).apply {
densityDpi = (densityDpi * scale).toInt()
fontScale *= scale
val newMode = when (AppCompatDelegate.getDefaultNightMode()) {
AppCompatDelegate.MODE_NIGHT_YES -> Configuration.UI_MODE_NIGHT_YES
AppCompatDelegate.MODE_NIGHT_NO -> Configuration.UI_MODE_NIGHT_NO
else -> {
// If we're following the system, we just use the system default from the
// application context
val appConfig = this@createScaleWrapper.applicationContext.resources.configuration
appConfig.uiMode and Configuration.UI_MODE_NIGHT_MASK
}
}
uiMode = (newMode or (uiMode and Configuration.UI_MODE_NIGHT_MASK.inv()))
}
return ContextThemeWrapper(this, androidx.appcompat.R.style.Theme_AppCompat_Empty).apply {
applyOverrideConfiguration(override)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ private void launchNextStage(boolean locked) {


public static class Starfield extends Drawable {
private static final int NUM_STARS = 34; // Build.VERSION_CODES.UPSIDE_DOWN_CAKE
private static final int NUM_STARS = Build.VERSION_CODES.UPSIDE_DOWN_CAKE;

private static final int NUM_PLANES = 2;
private final float[] mStars = new float[NUM_STARS * 4];
Expand Down
1 change: 1 addition & 0 deletions fastlane/metadata/android/en-US/changelogs/53.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- Add 'Animator duration scale' alert
- Update App theme colors
- Project modularization
- Upgrade project dependencies
1 change: 1 addition & 0 deletions fastlane/metadata/android/zh-CN/changelogs/53.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- 添加 ‘Animator 时长缩放’ 检查
- 更新 App 主题色
- 项目模块化
- 升级项目依赖项
60 changes: 60 additions & 0 deletions feature/widget/src/main/res/drawable-anydpi/ic_android_l.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<!--
Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="48dp"
android:height="48dp"
android:viewportWidth="560.0"
android:viewportHeight="560.0">
<path
android:pathData="M280.000000,288.000000m-260.000000,0.000000a260.000000,260.000000 0.000000,1.000000 1.000000,520.000000 0.000000a260.000000,260.000000 0.000000,1.000000 1.000000,-520.000000 0.000000"
android:fillColor="#14000000"/>
<path
android:pathData="M280.000000,285.000000m-255.000000,0.000000a255.000000,255.000000 0.000000,1.000000 1.000000,510.000000 0.000000a255.000000,255.000000 0.000000,1.000000 1.000000,-510.000000 0.000000"
android:fillColor="#26000000"/>
<path
android:pathData="M280.000000,282.000000m-252.000000,0.000000a252.000000,252.000000 0.000000,1.000000 1.000000,504.000000 0.000000a252.000000,252.000000 0.000000,1.000000 1.000000,-504.000000 0.000000"
android:fillColor="#26000000"/>
<path
android:pathData="M280.000000,280.000000m-250.000000,0.000000a250.000000,250.000000 0.000000,1.000000 1.000000,500.000000 0.000000a250.000000,250.000000 0.000000,1.000000 1.000000,-500.000000 0.000000"
android:fillColor="#9C27B0"/>
<path
android:pathData="M265.786011,244.938004l0.000000,8.768000c6.527000,-6.384000 15.303000,-10.321000 25.063000,-10.321000c20.214001,0.000000 36.429001,16.500000 36.429001,36.714001c0.000000,20.072001 -16.215000,36.500000 -36.429001,36.500000c-9.759000,0.000000 -18.107000,-3.651000 -24.634001,-9.759000l0.000000,25.839001l-10.107000,0.000000l0.000000,-87.740997L265.786011,244.937988L265.786011,244.938004zM267.330994,266.490997c-0.420000,0.706000 -1.125000,1.821000 -1.125000,4.277000l0.000000,18.813000c0.000000,1.759000 0.420000,2.740000 0.982000,3.723000c4.634000,7.929000 13.197000,13.339000 22.882999,13.339000c14.671000,0.000000 26.742001,-11.999000 26.742001,-26.669001c0.000000,-14.536000 -12.071000,-26.607000 -26.742001,-26.607000C280.454987,253.365997 271.963989,258.625000 267.330994,266.490997z"
android:fillColor="#FFFFFF"/>
<path
android:pathData="M427.973999,244.938004l0.000000,8.768000c6.526000,-6.384000 15.304000,-10.321000 25.062000,-10.321000c20.215000,0.000000 36.429001,16.500000 36.429001,36.714001c0.000000,20.072001 -16.214001,36.500000 -36.429001,36.500000c-9.758000,0.000000 -18.106001,-3.651000 -24.634001,-9.759000l0.000000,25.839001l-10.107000,0.000000l0.000000,-87.740997L427.973999,244.937988L427.973999,244.938004zM429.518005,266.490997c-0.419000,0.706000 -1.125000,1.821000 -1.125000,4.277000l0.000000,18.813000c0.000000,1.759000 0.420000,2.740000 0.982000,3.723000c4.634000,7.929000 13.196000,13.339000 22.884001,13.339000c14.670000,0.000000 26.740999,-11.999000 26.740999,-26.669001c0.000000,-14.536000 -12.071000,-26.607000 -26.740999,-26.607000C442.643005,253.365997 434.152008,258.625000 429.518005,266.490997z"
android:fillColor="#FFFFFF"/>
<path
android:pathData="M181.330994,279.893005c0.000000,20.214001 -16.357000,36.715000 -36.438000,36.715000c-20.214001,0.000000 -36.643002,-16.500999 -36.643002,-36.715000c0.000000,-20.070999 16.419001,-36.500000 36.643002,-36.500000C164.973007,243.393005 181.330994,259.821014 181.330994,279.893005zM171.151993,280.036011c0.000000,-14.669000 -11.723000,-26.669001 -26.259001,-26.669001c-14.741000,0.000000 -26.250000,12.000000 -26.250000,26.669001c0.000000,14.536000 11.509000,26.607000 26.250000,26.607000C159.429001,306.634003 171.151993,294.562012 171.151993,280.036011z"
android:fillColor="#FFFFFF"/>
<path
android:pathData="M408.384003,279.893005c0.000000,20.214001 -16.357000,36.715000 -36.437000,36.715000c-20.215000,0.000000 -36.644001,-16.500999 -36.644001,-36.715000c0.000000,-20.070999 16.420000,-36.500000 36.644001,-36.500000C392.026001,243.393005 408.384003,259.821014 408.384003,279.893005zM398.204987,280.036011c0.000000,-14.669000 -11.723000,-26.669001 -26.257999,-26.669001c-14.742000,0.000000 -26.250999,12.000000 -26.250999,26.669001c0.000000,14.536000 11.509000,26.607000 26.250999,26.607000C386.481995,306.634003 398.204987,294.562012 398.204987,280.036011z"
android:fillColor="#FFFFFF"/>
<path
android:pathData="M234.481995,227.320999l9.973000,0.000000l0.000000,10.250000l-9.973000,0.000000z"
android:fillColor="#FFFFFF"/>
<path
android:pathData="M234.481995,244.865997l9.973000,0.000000l0.000000,70.195999l-9.973000,0.000000z"
android:fillColor="#FFFFFF"/>
<path
android:pathData="M88.392998,227.320999l9.973000,0.000000l0.000000,87.740997l-9.973000,0.000000z"
android:fillColor="#FFFFFF"/>
<path
android:pathData="M191.231995,227.320999l9.973000,0.000000l0.000000,87.740997l-9.973000,0.000000z"
android:fillColor="#FFFFFF"/>
<path
android:pathData="M212.856995,227.320999l9.974000,0.000000l0.000000,87.740997l-9.974000,0.000000z"
android:fillColor="#FFFFFF"/>
</vector>
43 changes: 43 additions & 0 deletions feature/widget/src/main/res/drawable-anydpi/ic_android_m.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!--
Copyright (C) 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="48.0dp"
android:height="48.0dp"
android:viewportWidth="48.0"
android:viewportHeight="48.0">
<path
android:pathData="M24.0,2.0C11.8,2.0 2.0,11.8 2.0,24.0c0.0,6.1 2.5,11.6 6.4,15.6L39.6,8.4C35.6,4.5 30.1,2.0 24.0,2.0z"
android:fillColor="#E91E63"/>
<path
android:pathData="M39.6,8.4L8.4,39.6c4.0,4.0 9.5,6.4 15.6,6.4c12.2,0.0 22.0,-9.8 22.0,-22.0C46.0,17.9 43.5,12.4 39.6,8.4z"
android:fillColor="#F06292"/>
<path
android:pathData="M45.9,25.9L34.0,14.0L14.0,34.0l11.9,11.9C36.5,45.0 45.0,36.5 45.9,25.9z"
android:fillAlpha="0.33"
android:fillColor="#E91E63"/>
<path
android:pathData="M24.0,24.0c0.0,0.0 0.0,2.2 0.0,5.0s0.0,5.0 0.0,5.0l10.0,-10.0L34.0,14.0L24.0,24.0z"
android:fillColor="#FFFFFF"/>
<path
android:pathData="M24.0,24.0L14.0,14.0l0.0,10.0l10.0,10.0c0.0,0.0 0.0,-2.2 0.0,-5.0S24.0,24.0 24.0,24.0z"
android:fillColor="#EEEEEE"/>
<path
android:pathData="M14.0,34.0l10.0,0.0 -10.0,-10.0z"
android:fillColor="#DDDDDD"/>
<path
android:pathData="M34.0,34.0l0.0,-10.0 -10.0,10.0z"
android:fillColor="#DDDDDD"/>
</vector>
37 changes: 37 additions & 0 deletions feature/widget/src/main/res/drawable-anydpi/ic_android_n.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!--
Copyright (C) 2016 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="48.0"
android:viewportHeight="48.0">
<path
android:fillColor="#FF7E5BBF"
android:pathData="M32.0,12.5l0.0,28.0l12.0,-5.0l0.0,-28.0z"/>
<path
android:fillColor="#FF7E5BBF"
android:pathData="M4.0,40.5l12.0,-5.0l0.0,-11.0l-12.0,-12.0z"/>
<path
android:fillColor="#40000000"
android:pathData="M44.0,35.5l-12.0,-12.0l0.0,-4.0z"/>
<path
android:fillColor="#40000000"
android:pathData="M4.0,12.5l12.0,12.0l0.0,4.0z"/>
<path
android:fillColor="#FF55C4F5"
android:pathData="M32.0,23.5l-16.0,-16.0l-12.0,5.0l0.0,0.0l12.0,12.0l16.0,16.0l12.0,-5.0l0.0,0.0z"/>
</vector>

40 changes: 40 additions & 0 deletions feature/widget/src/main/res/drawable-anydpi/ic_android_o.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!--
Copyright (C) 2017 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="56dp"
android:height="56dp"
android:viewportWidth="48.0"
android:viewportHeight="48.0">
<path
android:pathData="M25.0,25.0m-20.5,0.0a20.5,20.5,0,1,1,41.0,0.0a20.5,20.5,0,1,1,-41.0,0.0"
android:fillAlpha="0.066"
android:fillColor="#000000"/>
<path
android:pathData="M24.0,24.0m-20.0,0.0a20.0,20.0,0,1,1,40.0,0.0a20.0,20.0,0,1,1,-40.0,0.0"
android:fillColor="#283593"/>
<path
android:pathData="M44,24.2010101 L33.9004889,14.101499 L14.101499,33.9004889 L24.2010101,44 C29.2525804,43.9497929 34.2887564,41.9975027 38.1431296,38.1431296 C41.9975027,34.2887564 43.9497929,29.2525804 44,24.2010101 Z"
android:fillColor="#1a237e"/>
<path
android:pathData="M24.0,24.0m-14.0,0.0a14.0,14.0,0,1,1,28.0,0.0a14.0,14.0,0,1,1,-28.0,0.0"
android:fillColor="#5c6bc0"/>
<path
android:pathData="M37.7829445,26.469236 L29.6578482,18.3441397 L18.3441397,29.6578482 L26.469236,37.7829445 C29.1911841,37.2979273 31.7972024,36.0037754 33.9004889,33.9004889 C36.0037754,31.7972024 37.2979273,29.1911841 37.7829445,26.469236 Z"
android:fillColor="#3f51b5"/>
<path
android:pathData="M24.0,24.0m-8.0,0.0a8.0,8.0,0,1,1,16.0,0.0a8.0,8.0,0,1,1,-16.0,0.0"
android:fillColor="#FFFFFF"/>
</vector>
27 changes: 27 additions & 0 deletions feature/widget/src/main/res/drawable-anydpi/ic_android_q.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!--
Copyright (C) 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="90dp"
android:height="90dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#3ddc84"
android:pathData="M19.45,22.89l-10.250001,-10.249999l-2.6599998,2.6599998l-1.77,-1.7600002l4.43,-4.4300003l12.0199995,12.0199995l-1.7699986,1.7600002z"/>
<path
android:fillColor="#3ddc84"
android:pathData="M12,6a6,6 0,1 1,-6 6,6 6,0 0,1 6,-6m0,-2.5A8.5,8.5 0,1 0,20.5 12,8.51 8.51,0 0,0 12,3.5Z"/>
</vector>
36 changes: 36 additions & 0 deletions feature/widget/src/main/res/drawable-anydpi/ic_android_s.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!--
Copyright (C) 2021 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="128dp"
android:height="128dp"
android:viewportWidth="128"
android:viewportHeight="128">
<path
android:pathData="M64,64m-64,0a64,64 0,1 1,128 0a64,64 0,1 1,-128 0"
android:fillColor="#787296"/>
<path
android:pathData="M32.5,34.15a10,10 0,0 1,9.94 10V93.85"
android:strokeWidth="4"
android:fillColor="#00000000"
android:strokeColor="#fff"
android:strokeLineCap="round"/>
<path
android:pathData="M95.5,93.85H55.71V83.9A19.9,19.9 0,0 1,75.61 64h10a9.94,9.94 0,0 0,9.94 -10,19.9 19.9,0 0,0 -38.69,-6.56A20.77,20.77 0,0 0,56 50.73"
android:strokeWidth="4"
android:fillColor="#00000000"
android:strokeColor="#fff"
android:strokeLineCap="round"/>
</vector>
Loading

0 comments on commit bd129f8

Please sign in to comment.