Skip to content

Commit

Permalink
fix: Theme Surface color
Browse files Browse the repository at this point in the history
  • Loading branch information
hushenghao committed Nov 25, 2023
1 parent ed63228 commit 5c70705
Show file tree
Hide file tree
Showing 12 changed files with 55 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
### v2.2.1 (2023-11-25)
- Fix F-Droid Reproducible Builds
- Fix Surface color [#112](https://github.com/hushenghao/AndroidEasterEggs/issues/112)

### v2.2.0 (2023-11-25)
- Added crash report
- Refactored with Compose
- Added Component Manager Settings
- Added Portuguese (Brazilian) translation
- Added Portuguese (Brazilian) translation
- Optimized easter egg search
- Known issue fixes

### v2.1.0 (2023-10-25)
- Use Android Q internal code name
- Use Android Q internal code name
- Added Japanese translation
- Added French translation
- Added Korean translation
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,3 @@ Prerequisites The `Java17` and `Android SDK` have been installed, and environmen
[AOSP Frameworks](https://github.com/aosp-mirror/platform_frameworks_base)

[All translation contributors](https://crowdin.com/project/easter-eggs/members)

[🦖 T-Rex Run 3D](https://github.com/Priler/dino3d)
2 changes: 0 additions & 2 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,3 @@
[AOSP Frameworks](https://github.com/aosp-mirror/platform_frameworks_base)

[所有翻译贡献者](https://zh.crowdin.com/project/easter-eggs/members)

[🦖 T-Rex Run 3D](https://github.com/Priler/dino3d)
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ android {
applicationId = "com.dede.android_eggs"
minSdk = Versions.MIN_SDK
targetSdk = Versions.TARGET_SDK
versionCode = 33
versionName = "2.2.0"
versionCode = 34
versionName = "2.2.1"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

resourceConfigurations += listOf(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import com.dede.android_eggs.R
import com.dede.android_eggs.ui.Icons
import com.dede.android_eggs.ui.drawables.FontIconsDrawable
import com.dede.android_eggs.util.ActivityActionDispatcher
import com.dede.android_eggs.util.ThemeUtils
import com.dede.android_eggs.util.updateCompoundDrawablesRelative
import com.dede.basic.createThemeWrapperContext
import com.dede.basic.dp
Expand Down Expand Up @@ -48,6 +49,7 @@ class WarningDialogAction : ActivityActionDispatcher.ActivityAction {
if (agreed) return

val wrapperContext = activity.createThemeWrapperContext()
ThemeUtils.tryApplyOLEDTheme(wrapperContext)
val spanned = HtmlCompat.fromHtml(
wrapperContext.getString(info.message),
HtmlCompat.FROM_HTML_MODE_COMPACT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ fun EasterEggScreen(
easterEggs
}
}
Surface(color = colorScheme.surface) {
Surface(color = colorScheme.background) {
Box(
modifier = Modifier.fillMaxSize(),
contentAlignment = Alignment.TopCenter,
Expand Down
29 changes: 23 additions & 6 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
<item name="android:windowSplashScreenBackground" tools:targetApi="s">
@color/splash_background_color
</item>
<item name="materialAlertDialogTheme">@style/ThemeOverlay.MaterialAlertDialog.BlurBehind</item>
<item name="materialAlertDialogTheme">@style/ThemeOverlay.MaterialAlertDialog.BlurBehind
</item>
<item name="bottomSheetDialogTheme">@style/ThemeOverlay.BottomSheetDialog.BlurBehind</item>
</style>

Expand Down Expand Up @@ -58,14 +59,25 @@
<style name="ThemeOverlay.MaterialAlertDialog.BlurBehind" parent="ThemeOverlay.Material3.MaterialAlertDialog.Centered">
<item name="android:windowBlurBehindEnabled" tools:ignore="NewApi">true</item>
<item name="android:windowBlurBehindRadius" tools:ignore="NewApi">4dp</item>
<item name="alertDialogStyle">@style/Theme.MaterialAlertDialog.Style</item>
</style>

<style name="Theme.MaterialAlertDialog.Style" parent="MaterialAlertDialog.Material3">
<item name="backgroundTint">?attr/colorSurface</item>
</style>

<style name="ThemeOverlay.LanguagePref.MaterialAlertDialog" parent="ThemeOverlay.MaterialAlertDialog.BlurBehind">
<!-- Mark spacer as gone when showing full width buttons -->
<item name="materialAlertDialogButtonSpacerVisibility">@integer/mtrl_view_gone</item>
<item name="buttonBarPositiveButtonStyle">@style/Widget.LanguagePref.Button.TextButton.Dialog.FullWidth</item>
<item name="buttonBarNegativeButtonStyle">@style/Widget.LanguagePref.Button.TextButton.Dialog.FullWidth</item>
<item name="buttonBarNeutralButtonStyle">@style/Widget.LanguagePref.Button.TextButton.Dialog.FullWidth</item>
<item name="buttonBarPositiveButtonStyle">
@style/Widget.LanguagePref.Button.TextButton.Dialog.FullWidth
</item>
<item name="buttonBarNegativeButtonStyle">
@style/Widget.LanguagePref.Button.TextButton.Dialog.FullWidth
</item>
<item name="buttonBarNeutralButtonStyle">
@style/Widget.LanguagePref.Button.TextButton.Dialog.FullWidth
</item>
</style>

<style name="Widget.LanguagePref.Button.TextButton.Dialog.FullWidth" parent="Widget.Material3.Button.TextButton.Dialog">
Expand All @@ -79,16 +91,21 @@
<style name="ThemeOverlay.BottomSheetDialog.BlurBehind" parent="ThemeOverlay.Material3.BottomSheetDialog">
<item name="android:windowBlurBehindEnabled" tools:ignore="NewApi">true</item>
<item name="android:windowBlurBehindRadius" tools:ignore="NewApi">4dp</item>
<item name="bottomSheetStyle">@style/Theme.BottomSheet.Modal</item>
</style>

<style name="ThemeOverlay.BottomSheetDialog.Scrollable" parent="ThemeOverlay.BottomSheetDialog.BlurBehind">
<item name="bottomSheetStyle">@style/Widget.BottomSheet.Modal.Scrollable</item>
<item name="bottomSheetStyle">@style/Theme.BottomSheet.Modal.Scrollable</item>
</style>

<style name="Widget.BottomSheet.Modal.Scrollable" parent="Widget.Material3.BottomSheet.Modal">
<style name="Theme.BottomSheet.Modal.Scrollable" parent="Theme.BottomSheet.Modal">
<item name="paddingBottomSystemWindowInsets">false</item>
</style>

<style name="Theme.BottomSheet.Modal" parent="Widget.Material3.BottomSheet.Modal">
<item name="backgroundTint">?attr/colorSurface</item>
</style>

<style name="Theme.EggGroup.PopupMenu.ListPopupWindow" parent="Widget.Material3.PopupMenu.ListPopupWindow">
<item name="android:popupBackground">@drawable/popupmenu_background_overlay</item>
<item name="android:dropDownHorizontalOffset">-12dp</item>
Expand Down
8 changes: 8 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/34.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- Fix F-Droid Reproducible Builds
- Fix Surface color
- Added crash report
- Refactored with Compose
- Added Component Manager Settings
- Added Portuguese (Brazilian) translation
- Optimized easter egg search
- Known issue fixes
8 changes: 8 additions & 0 deletions fastlane/metadata/android/zh-CN/changelogs/34.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- 修复F-Droid可重复构建
- 修复主题背景色
- 新增崩溃上报
- 使用Compose重构
- 新增组件管理设置
- 新增葡萄牙语(巴西)翻译
- 优化彩蛋搜索功能
- 修复已知问题
8 changes: 4 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[versions]
kotlin = "1.9.20"
kotlin = "1.9.10"
# https://androidx.dev/storage/compose-compiler/repository
# https://maven.google.com/web/index.html?q=compose#androidx.compose.compiler:compiler
compose-kotlin-compiler = "1.5.4"
compose-kotlin-compiler = "1.5.3"
agp = "8.1.4"
hilt = "2.48.1"
# https://google.github.io/accompanist
Expand All @@ -19,7 +19,7 @@ kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlinx-coroutines-android = "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3"
androidx-appcompat = "androidx.appcompat:appcompat:1.6.1"
androidx-core = "androidx.core:core-ktx:1.12.0"
androidx-activity = "androidx.activity:activity-ktx:1.8.0"
androidx-activity = "androidx.activity:activity-ktx:1.8.1"
androidx-lifecycle-viewmodel = "androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2"
androidx-lifecycle-runtime = "androidx.lifecycle:lifecycle-runtime-ktx:2.6.2"
androidx-recyclerview = "androidx.recyclerview:recyclerview:1.3.2"
Expand All @@ -32,7 +32,7 @@ androidx-window = "androidx.window:window:1.1.0"
google-material = "com.google.android.material:material:1.11.0-beta01"
androidx-startup = "androidx.startup:startup-runtime:1.1.1"

androidx-activity-compose = "androidx.activity:activity-compose:1.8.0"
androidx-activity-compose = "androidx.activity:activity-compose:1.8.1"
androidx-lifecycle-compose = "androidx.lifecycle:lifecycle-runtime-compose:2.6.2"
androidx-compose-bom = "androidx.compose:compose-bom:2023.10.01"
androidx-compose-ui = { module = "androidx.compose.ui:ui" }
Expand Down
1 change: 0 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ dependencyResolutionManagement {
google()
mavenCentral()
maven { setUrl("https://jitpack.io") }
//maven { setUrl("https://androidx.dev/storage/compose-compiler/repository/") }
}
}

Expand Down

0 comments on commit 5c70705

Please sign in to comment.