feat : 麦位皮肤 提交

This commit is contained in:
eggmanQQQ
2024-12-26 16:38:46 +08:00
parent ef052fff6c
commit ce706bf90f
33 changed files with 519 additions and 208 deletions

View File

@@ -1414,6 +1414,26 @@ class GlideUtils {
val glideConfig = getGlideConfig(context)
glideConfig
?.asDrawable()
// ?.skipMemoryCache(true)
?.load(url)
?.addListener(listener)
?.submit()
} /**
* 使用Glide下载图片,返回File
*/
fun downloadFromUrlToBitmap(
context: Context?,
url: String?,
listener: RequestListener<Bitmap?>?
) {
if (context == null) {
LibLogger.error(TAG, "load context is null")
return
}
val glideConfig = getGlideConfig(context)
glideConfig
?.asBitmap()
// ?.skipMemoryCache(true)
?.load(url)
?.addListener(listener)

View File

@@ -149,6 +149,16 @@ fun String?.doLogW() {
}
}
}
fun String?.doLogE() {
if (BuildConfig.DEBUG) {
if (this.isVerify()) {
val stackTrace = Thread.currentThread().stackTrace
val line = stackTrace?.getOrNull(3)?.lineNumber?:""
val fileName = stackTrace?.getOrNull(3)?.fileName?:""
Log.println(Log.ERROR, "doLog", "$this at ($fileName:$line)")
}
}
}
fun Int.doToast() {
val string = this.getString()