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:
16
gallery/src/main/res/layout/dialog_color_palette.xml
Normal file
16
gallery/src/main/res/layout/dialog_color_palette.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_dialog"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
</FrameLayout>
|
||||
Reference in New Issue
Block a user