feat: 添加系统相册入口及重置默认打开方式功能

【功能更新】
1. 系统相册按钮:
   - 工具栏新增“系统相册”菜单项 (ic_cover)。
   - 点击后通过 Intent 调用系统默认相册。

2. 重置按钮:
   - 工具栏新增“重置”菜单项 (ic_cover_reset)。
   - 清除图库 ACTION_VIEW 的默认打开记录,恢复应用选择框。
   - 兼容处理:API <= 30 自动清除,API > 30 提示适配限制说明。

【代码变更】
- MainActivity.java: 新增 action_gallery 与 action_reset_gallery 响应逻辑,包含异常捕获。
- menu_main.xml: 注册两个新菜单项。
- strings.xml: 新增 "system_gallery", "reset_gallery" 字符串资源。

【其他新增】
- 新增 ColorPaletteDialog 类及 dialog_color_palette.xml 布局。
- 新增 styles.xml 样式 ColorPaletteDialog。
- 新增重置图标资源 ic_cover_reset.xml。
- 更新 build.properties 版本配置。
This commit is contained in:
2026-04-30 22:54:44 +08:00
parent ffea383a4e
commit 0788a52652
8 changed files with 128 additions and 3 deletions

View File

@@ -8,4 +8,9 @@
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="ColorPaletteDialog" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowIsFloating">false</item>
</style>
</resources>