[2.14.0][Opt]升级高德地图版本新增对应功能
This commit is contained in:
@@ -81,6 +81,9 @@ class OfflineMapDialog(context: Context): BaseFloatDialog(context) {
|
||||
}
|
||||
|
||||
okView?.setOnClickListener {
|
||||
if (isLoading) {
|
||||
CallerMapUIServiceManager.cancelDownloadCacheData()
|
||||
}
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
@@ -90,6 +93,12 @@ class OfflineMapDialog(context: Context): BaseFloatDialog(context) {
|
||||
override fun onMapHdCacheProgress(cityId: Int, progress: Double) {
|
||||
updateProgress(progress.toInt())
|
||||
}
|
||||
|
||||
override fun onMapHdCacheResult(cityId: Int, state: Int) {
|
||||
if (state == 0) {// 失败
|
||||
showNewContent(isLoading = false, false)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -131,6 +140,7 @@ class OfflineMapDialog(context: Context): BaseFloatDialog(context) {
|
||||
|
||||
@SuppressLint("UseCompatLoadingForDrawables")
|
||||
private fun showNewContent(isLoading: Boolean, isSuccess: Boolean) {
|
||||
this.isLoading = isLoading
|
||||
change2NewStyle()
|
||||
when {
|
||||
isLoading -> {
|
||||
|
||||
Reference in New Issue
Block a user