Gallery: 升级依赖版本,配置主题系统参照aes模块

1. 依赖升级
   - libaes 15.15.9 → 15.20.21
   - libappbase 15.15.21 → 15.20.34

2. 主题配置(参照aes模块)
   - AppTheme → GalleryTheme (parent: AESTheme)
   - 新增 values-night/ 支持暗色模式
   - 补充主题颜色定义

3. 编译修复
   - Adapter onBindViewHolder holder 参数加 final(Java 7 要求)
This commit is contained in:
MiMo
2026-07-18 14:56:28 +08:00
parent 975af960a4
commit 184d4eef64
10 changed files with 71 additions and 15 deletions
+2 -2
View File
@@ -108,8 +108,8 @@ dependencies {
implementation 'com.termux:termux-shared:0.118.0'
*/
// WinBoLL库 nexus.winboll.cc 地址
api 'cc.winboll.studio:libaes:15.15.9'
api 'cc.winboll.studio:libappbase:15.15.21'
api 'cc.winboll.studio:libaes:15.20.21'
api 'cc.winboll.studio:libappbase:15.20.34'
// WinBoLL备用库 jitpack.io 地址
//api 'com.github.ZhanGSKen:AES:aes-v15.15.7'
+2 -2
View File
@@ -1,8 +1,8 @@
#Created by .winboll/winboll_app_build.gradle
#Sat May 02 10:32:03 CST 2026
#Sat Jul 18 14:50:11 CST 2026
stageCount=16
libraryProject=
baseVersion=15.0
publishVersion=15.0.15
buildCount=19
buildCount=22
baseBetaVersion=15.0.16
+1 -1
View File
@@ -12,7 +12,7 @@
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:label="@string/app_name"
android:theme="@style/AppTheme"
android:theme="@style/GalleryTheme"
android:resizeableActivity="true"
android:name=".GlobalWinBoLLApplication"
android:requestLegacyExternalStorage="true">
@@ -159,7 +159,7 @@ private void showContextMenu(View view, final Album album) {
}
@Override
public void onBindViewHolder(@NonNull ViewHolder holder, final int position) {
public void onBindViewHolder(@NonNull final ViewHolder holder, final int position) {
final Album album = albums.get(position);
LogUtils.d(TAG, "bind: " + album.getName() + ", cover=" + album.getCoverUri());
@@ -188,7 +188,7 @@ public class ImageAdapter extends RecyclerView.Adapter<ImageAdapter.ViewHolder>
}
@Override
public void onBindViewHolder(@NonNull ViewHolder holder, final int position) {
public void onBindViewHolder(@NonNull final ViewHolder holder, final int position) {
holder.imageView.setBackgroundResource(getBgRes());
Glide.with(holder.imageView.getContext())
@@ -65,7 +65,7 @@ public class TrashAdapter extends RecyclerView.Adapter<TrashAdapter.ViewHolder>
}
@Override
public void onBindViewHolder(@NonNull ViewHolder holder, final int position) {
public void onBindViewHolder(@NonNull final ViewHolder holder, final int position) {
if (position < imageUrls.size()) {
Glide.with(holder.imageView.getContext())
.load(imageUrls.get(position))
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#009688</color>
<color name="colorPrimaryDark">#4DB6AC</color>
<color name="colorAccent">#00796B</color>
<color name="black">#000000</color>
<color name="white">#FFFFFF</color>
<!-- 主题颜色(暗色模式) -->
<color name="toolbarBackgroundColor">#4DB6AC</color>
<color name="toolbarTextColor">#FFFFFF</color>
<color name="mainWindowBackgroundColor">#FF2C2C2C</color>
<color name="mainWindowTextColor">#FFFFFFFF</color>
<color name="debugTextColor">#FFAAAAAA</color>
</resources>
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Gallery 主题(暗色模式),继承 libaes 的 AESTheme -->
<style name="GalleryTheme" parent="AESTheme">
<item name="themeDebug">@style/GalleryDebugActivityTheme</item>
</style>
<!-- Gallery 调试主题(暗色模式) -->
<style name="GalleryDebugActivityTheme" parent="Theme.AppCompat.NoActionBar">
<item name="android:statusBarColor">?attr/colorPrimaryDark</item>
<item name="colorTittle">@color/mainWindowTextColor</item>
<item name="colorTittleBackgound">@color/toolbarBackgroundColor</item>
<item name="colorText">@color/debugTextColor</item>
<item name="colorTextBackgound">@color/mainWindowBackgroundColor</item>
<item name="debugTextColor">@color/debugTextColor</item>
<item name="toolbarTextColor">@color/toolbarTextColor</item>
</style>
<style name="ColorPaletteDialog" parent="Theme.AppCompat.NoActionBar">
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowIsFloating">false</item>
</style>
</resources>
+8 -1
View File
@@ -5,4 +5,11 @@
<color name="colorAccent">#FF9800</color>
<color name="black">#000000</color>
<color name="white">#FFFFFF</color>
</resources>
<!-- 主题颜色 -->
<color name="toolbarBackgroundColor">#009688</color>
<color name="toolbarTextColor">#FFFFFF</color>
<color name="mainWindowBackgroundColor">#FFF5F5F5</color>
<color name="mainWindowTextColor">#FF000000</color>
<color name="debugTextColor">#FF808080</color>
</resources>
+15 -6
View File
@@ -1,11 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<!-- Gallery 主题,继承 libaes 的 AESTheme -->
<style name="GalleryTheme" parent="AESTheme">
<item name="themeDebug">@style/GalleryDebugActivityTheme</item>
</style>
<!-- Gallery 调试主题 -->
<style name="GalleryDebugActivityTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:statusBarColor">?attr/colorPrimaryDark</item>
<item name="colorTittle">@color/mainWindowTextColor</item>
<item name="colorTittleBackgound">@color/toolbarBackgroundColor</item>
<item name="colorText">@color/debugTextColor</item>
<item name="colorTextBackgound">@color/mainWindowBackgroundColor</item>
<item name="debugTextColor">@color/debugTextColor</item>
<item name="toolbarTextColor">@color/toolbarTextColor</item>
</style>
<style name="ColorPaletteDialog" parent="Theme.AppCompat.Light.NoActionBar">