diff --git a/.changelog/lang_zh-Hans.json b/.changelog/lang_zh-Hans.json index b430fd8a..32a96420 100644 --- a/.changelog/lang_zh-Hans.json +++ b/.changelog/lang_zh-Hans.json @@ -1,7 +1,7 @@ { "$data": { "v6.7.0": { - "released_date": "2025/06/28", + "released_date": "2025/07/03", "feature": [ "zip 模块, 用于文件压缩与解压缩操作 (Ref to [Auto.js Pro](https://g.pro.autojs.org/)) (参阅 项目文档 > [Zip](https://docs.autojs6.com/#/zip))", "mediainfo 模块, 用于查看媒体文件的详细信息 (参阅 项目文档 > [媒体信息](https://docs.autojs6.com/#/mediainfo))", @@ -22,7 +22,8 @@ "http 模块相关方法支持不安全选项参数 (isInsecure/insecure), 用于忽略证书相关异常 _[`issue #417`](http://issues.autojs6.com/417)_", "android.graphics.Paint#setColor 支持正常解析 ColorInt/ColorHex/ColorName 等颜色参数", "内置模块相关方法实参类型的异常消息增加类型摘要信息", - "崩溃报告页面支持双指缩放调整字体大小并添加常用功能按钮" + "崩溃报告页面支持双指缩放调整字体大小并添加常用功能按钮", + "应用启动器图标支持自适应图标特性 _[`issue #405`](http://issues.autojs6.com/405)_" ], "dependency": [ "附加 Androidx Core (KTX) 版本 1.16.0", diff --git a/app/build.gradle.kts b/app/build.gradle.kts index c43ac054..cfac9a7d 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -481,7 +481,7 @@ android { "intentCategory" to "android.intent.category.LAUNCHER", "intentCategoryInrt" to "android.intent.category.DEFAULT", "authorities" to "org.autojs.autojs6.fileprovider", - "icon" to "@drawable/autojs6_material", + "icon" to "@mipmap/ic_app_launcher_adaptive", ) ) } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 151b7a5b..d1adeb29 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -209,7 +209,6 @@ @@ -403,7 +402,6 @@ @@ -507,7 +505,6 @@ @@ -533,7 +530,6 @@ @@ -561,7 +557,6 @@ diff --git a/app/src/main/java/org/autojs/autojs/core/ui/inflater/util/Dimensions.kt b/app/src/main/java/org/autojs/autojs/core/ui/inflater/util/Dimensions.kt index 43aafc42..6c0145d4 100644 --- a/app/src/main/java/org/autojs/autojs/core/ui/inflater/util/Dimensions.kt +++ b/app/src/main/java/org/autojs/autojs/core/ui/inflater/util/Dimensions.kt @@ -29,6 +29,7 @@ object Dimensions { private val DIMENSION_PATTERN = Pattern.compile("([+-]?[0-9.]+)([a-zA-Z]*)") + @JvmStatic fun parseToPixel(dimension: String, view: View, parent: ViewGroup?, horizontal: Boolean): Int { if (dimension.endsWith("%") && parent != null) { val pct = dimension.substring(0, dimension.length - 1).toFloat() / 100.0f @@ -37,15 +38,18 @@ object Dimensions { return parseToIntPixel(dimension, view.context) } + @JvmStatic fun parseToPixel(dimension: String, view: View): Float { return parseToPixel(dimension, view.context) } + @JvmStatic fun parseToPixel(view: View, dimension: String): Float { return parseToPixel(dimension, view.context) } @SuppressLint("DiscouragedApi") + @JvmStatic fun parseToPixel(dimension: String, context: Context): Float { if (dimension.startsWith("?")) { val attr = intArrayOf( @@ -71,14 +75,17 @@ object Dimensions { }.getOrElse { e -> throw RuntimeException(e) } } + @JvmStatic fun parseToIntPixel(value: String, view: View): Int { return parseToPixel(value, view).roundToInt() } + @JvmStatic fun parseToIntPixel(value: String, context: Context): Int { return parseToPixel(value, context).roundToInt() } + @JvmStatic fun parseToIntPixelArray(view: View, value: String): IntArray { val split: Array = ViewAttributes.parseAttrValue(value).toTypedArray() val pixels = IntArray(4) diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_app_launcher_adaptive.xml b/app/src/main/res/mipmap-anydpi-v26/ic_app_launcher_adaptive.xml new file mode 100644 index 00000000..f97815ad --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/ic_app_launcher_adaptive.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_adaptive_foreground.png b/app/src/main/res/mipmap-hdpi/ic_launcher_adaptive_foreground.png new file mode 100644 index 00000000..c945fe12 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_adaptive_foreground.png differ diff --git a/app/src/main/res/mipmap-mdpi/ic_app_launcher_adaptive_foreground.png b/app/src/main/res/mipmap-mdpi/ic_app_launcher_adaptive_foreground.png new file mode 100644 index 00000000..4e802a9a Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_app_launcher_adaptive_foreground.png differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_app_launcher_adaptive_foreground.png b/app/src/main/res/mipmap-xhdpi/ic_app_launcher_adaptive_foreground.png new file mode 100644 index 00000000..1567eb16 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_app_launcher_adaptive_foreground.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_app_launcher_adaptive_foreground.png b/app/src/main/res/mipmap-xxhdpi/ic_app_launcher_adaptive_foreground.png new file mode 100644 index 00000000..902b505d Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_app_launcher_adaptive_foreground.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_app_launcher_adaptive_foreground.png b/app/src/main/res/mipmap-xxxhdpi/ic_app_launcher_adaptive_foreground.png new file mode 100644 index 00000000..a042b995 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_app_launcher_adaptive_foreground.png differ diff --git a/app/src/main/res/mipmap/ic_app_launcher_adaptive.png b/app/src/main/res/mipmap/ic_app_launcher_adaptive.png new file mode 100644 index 00000000..33a2ae81 Binary files /dev/null and b/app/src/main/res/mipmap/ic_app_launcher_adaptive.png differ diff --git a/app/src/main/res/mipmap/ic_app_launcher_monochrome.png b/app/src/main/res/mipmap/ic_app_launcher_monochrome.png new file mode 100644 index 00000000..87b93f33 Binary files /dev/null and b/app/src/main/res/mipmap/ic_app_launcher_monochrome.png differ diff --git a/app/src/main/res/values/ic_app_launcher_adaptive_background.xml b/app/src/main/res/values/ic_app_launcher_adaptive_background.xml new file mode 100644 index 00000000..fc7b8c2a --- /dev/null +++ b/app/src/main/res/values/ic_app_launcher_adaptive_background.xml @@ -0,0 +1,4 @@ + + + #FFFFFF + \ No newline at end of file diff --git a/version.properties b/version.properties index 40710897..17230177 100644 --- a/version.properties +++ b/version.properties @@ -1,5 +1,5 @@ -#Tue Jul 01 00:19:56 CST 2025 -BUILD_TIME=1751300396808 +#Thu Jul 03 14:14:37 CST 2025 +BUILD_TIME=1751523277489 COMPILE_SDK_VERSION=35 IMAGE_QUANT_CMAKE_VERSION=3.22.1 IMAGE_QUANT_NDK_VERSION=26.1.10909125 @@ -19,6 +19,6 @@ RAPID_OCR_OPENCV_MOBILE_LABEL_VERSION=13 RAPID_OCR_OPENCV_MOBILE_VERSION=4.5.3 TARGET_SDK_VERSION=35 TARGET_SDK_VERSION_INRT=29 -VERSION_BUILD=3312 -VERSION_NAME=6.7.0 Alpha2 +VERSION_BUILD=3319 +VERSION_NAME=6.7.0 Alpha3 VSCODE_EXT_REQUIRED_VERSION=1.0.8