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:
@@ -2,6 +2,18 @@
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item
|
||||
android:id="@+id/action_gallery"
|
||||
android:title="@string/system_gallery"
|
||||
android:icon="@drawable/ic_cover"
|
||||
app:showAsAction="ifRoom"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/action_reset_gallery"
|
||||
android:title="@string/reset_gallery"
|
||||
android:icon="@drawable/ic_cover_reset"
|
||||
app:showAsAction="ifRoom"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/action_trash"
|
||||
android:title="@string/trash"
|
||||
|
||||
Reference in New Issue
Block a user