feat : 麦位皮肤 提交
This commit is contained in:
@@ -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)
|
||||
|
@@ -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()
|
||||
|
Reference in New Issue
Block a user