更换资源svg为png,处理bitmap异步加载回调导致使用回收的bitmap崩溃情况

This commit is contained in:
litingting 2025-11-20 11:44:33 +08:00
parent c4230c9755
commit a8ec1ae134
192 changed files with 179 additions and 461 deletions

View File

@ -18,8 +18,8 @@ android {
applicationId = "com.sketch.ar.artdrawing"
minSdk = 24
targetSdk = 36
versionCode = 3
versionName = "1.2"
versionCode = 4
versionName = "1.3"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
setProperty(
"archivesBaseName",
@ -87,7 +87,7 @@ dependencies {
implementation("com.github.bumptech.glide:glide:4.16.0")
kapt("com.github.bumptech.glide:compiler:4.16.0")
implementation("com.caverock:androidsvg:1.4")
val camerax_version = "1.5.0"
//noinspection GradleDependency
@ -103,6 +103,10 @@ dependencies {
//noinspection GradleDependency
implementation("androidx.camera:camera-extensions:${camerax_version}")
// implementation("io.coil-kt:coil:2.7.0")
//// Coil核心库
// implementation("io.coil-kt:coil-svg:2.7.0")
implementation(files("libs/TopOnLibrary_11_06_18_02-release.aar"))
implementation(files("libs/UpLoadLibrary_07_03_11_54-release.aar"))

View File

@ -50,7 +50,7 @@
</activity>
<activity
android:name=".main.MainCategoryActivity"
android:exported="true" />
android:exported="false" />
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 912 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 99 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="347" height="347" fill="none"><path fill="#fff" d="M0 0h347v347H0z"/><path fill="#fff" stroke="#000" d="M311.164 174.953c-19.439-7.437-61.84-11.873-61.84-11.873-3.653 1.827-9.523.131-9.523.131-18.135-16.83-46.968-27.267-46.968-27.267l2.217-1.435c-9.132-4.957-35.616-6.262-59.621-6.001-14.346.156-39.374 1.947-57.431 3.362 0 0-1.376-.882-3.387-.882-2.01 0-19.33-26.908-19.33-26.908s-1.222-.387-.688.541c.533.928 18.577 25.318 16.784 27.776l-.08.006-.181.015c-8.537.688-14.362 1.189-14.72 1.189-1.11 0-10.061 0-10.755.416-.694.417-.139 2.637-.139 2.637l1.249 1.388h7.841l-2.983 26.229-14.017-.625s-6.523 5.344-9.784 7.356-9.134 9.118-9.134 9.118l1.015 4.621c-1.04.347-2.03 5.395-2.03 5.395l19.4 9.077c12.655-16.83 24.658-12.916 24.658-12.916 33.137.522 36.66 37.183 36.66 37.183l142.987.652c1.044-19.048 10.438-33.269 27.529-38.748 17.09-5.479 32.224 10.437 32.224 10.437l28.049-.652v-3.522c.002-.001-4.304-11.873-18.002-16.7Z"/><path fill="#fff" stroke="#000" d="M244.108 228.027s54.895-6.77 60.649-3.046l3.602-8.215-2.739-17.058-13.705-12.687-24.456-2.816-21.602 12.599-5.795 26.224zM93.682 227.269l-60.666-4.566-4.697-7.698 5.675-17.222 17.433-9.197 20.407-.832 15.45 9.85 9.119 16.88zM195.051 134.509s30.124 10.439 54.274 28.571l-.929 1.369h-9.336s-32.982-23.852-47.022-27.532l.796-.973z"/><path fill="#fff" stroke="#000" d="m330.377 212.953 1.933 1.779-.542 2.473s.309 3.401-.425 3.71-2.589 3.402-2.589 3.402l-24.195 3.014s3.168-26.204-9.896-33.935c-13.064-7.73-29.606-10.049-41.123 3.633-11.518 13.682-9.431 30.998-9.431 30.998l-150.427-.758s1.305-23.484-10.698-30.92c-12.002-7.437-25.57-11.481-40.182.261s-9.786 26.092-9.786 26.092-11.872-.391-17.22-8.48c0 0-1.828-2.871-1.306-10.437 0 0-.895-.286-.812-1.309.083-1.024 1.687-11.201 1.687-11.201s1.383-1.051 2.295-1.134c.913-.083 13.268 1.641 22.14.467 0 0 10.372-10.372 25.245-9.068 14.872 1.305 23.222 10.307 28.44 16.7 5.22 6.393 7.111 21.266 7.111 21.266l138.878 2.217s-1.63-19.83 13.438-33.398 35.421-7.045 41.292-3.327 8.741 6.98 8.741 6.98 22.505 1.696 24.266 1.696c1.762 0 1.957-2.022 1.957-2.022s2.218.391 2.022 4.957c0 0 .934-.13 1.381.914s.38 5.805.38 5.805l-1.434 1.435c-.001.001.329 7.117-1.14 8.19ZM37.593 163.652l9.159-25.605h7.841l-2.983 26.23zM59.891 162.428c-.74-.947 21.658-28.18 67.842-29.093l1.304 33.007s-66.797-.912-69.146-3.914ZM135.17 166.342l-4.436-33.007s42.793-1.826 61.188 5.088c18.395 6.915 26.744 14.612 26.744 14.612l.652 5.617s-1.057-.224-1.589.866c-.53 1.09-1.006 6.43-.698 7.184.307.755 3.509 2.49 3.509 2.49l.214 1.847z"/><path fill="#fff" stroke="#000" d="M134.378 176.489s-1.354.338-1.32 1.523 1.117 1.489 1.117 1.489l16.387.238s1.727-.238 1.693-1.084-1.998-1.286-1.998-1.286zM51.428 166.997l-2.01 13.129s-24.29-.231-28.31 3.511v-2.96s9.046-10.72 22-13.903zM309.357 178.6s9.221 1.391 10.812 2.385 7.273 8.824 7.273 8.824l-28.101-2.544s8.189-8.189 10.016-8.665Z"/><path fill="#000" d="M90.052 218.082c0 14.25-11.552 25.802-25.802 25.802s-25.802-11.552-25.802-25.802S50 192.28 64.25 192.28s25.802 11.552 25.802 25.802"/><path fill="#fff" d="M82.623 218.082c0 10.148-8.226 18.374-18.374 18.374s-18.373-8.226-18.373-18.374 8.226-18.374 18.373-18.374 18.374 8.226 18.374 18.374"/><path fill="#000" d="M83.319 215.992H69.295l9.917-9.916-2.957-2.956-9.916 9.916v-14.023h-4.18v14.023l-9.916-9.916-2.956 2.956 9.916 9.916H45.18v4.181h14.023l-9.916 9.916 2.956 2.955 9.916-9.915v14.022h4.18v-14.022l9.916 9.915 2.957-2.955-9.917-9.916H83.32zM300.012 218.082c0 14.25-11.551 25.802-25.802 25.802-14.249 0-25.802-11.552-25.802-25.802s11.552-25.802 25.802-25.802 25.802 11.552 25.802 25.802"/><path fill="#fff" stroke="#000" d="M292.584 218.082c0 10.148-8.226 18.374-18.374 18.374s-18.375-8.226-18.375-18.374 8.227-18.374 18.375-18.374 18.374 8.226 18.374 18.374Z"/><path fill="#000" d="M293.279 215.992h-14.023l9.916-9.916-2.956-2.956-9.916 9.916v-14.023h-4.181v14.023l-9.914-9.916-2.956 2.956 9.915 9.916h-14.023v4.181h14.022l-9.915 9.916 2.957 2.955 9.914-9.915v14.022h4.181v-14.022l9.916 9.915 2.956-2.955-9.916-9.916h14.023z"/><path fill="#fff" stroke="#000" d="M96.403 195.536c-.554-1.528 139.804 2.962 139.804 2.962s.247 5.233-3.702 5.579c-3.95.345-123.683-3.234-123.683-3.234s-10.273.618-12.419-5.307Z"/></svg>

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 95 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 146 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 134 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 126 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 220 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 184 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 452 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 469 KiB

Some files were not shown because too many files have changed in this diff Show More