mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08:00
Converting drawable to bitmap for map symbol to fix invisible text
This commit is contained in:
parent
67d4afa012
commit
3a5c139759
@ -23,6 +23,7 @@ import android.view.Gravity
|
|||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.core.content.res.use
|
import androidx.core.content.res.use
|
||||||
|
import androidx.core.graphics.drawable.toBitmap
|
||||||
import androidx.core.view.marginBottom
|
import androidx.core.view.marginBottom
|
||||||
import androidx.core.view.marginTop
|
import androidx.core.view.marginTop
|
||||||
import androidx.core.view.updateLayoutParams
|
import androidx.core.view.updateLayoutParams
|
||||||
@ -162,7 +163,7 @@ class MapTilerMapView @JvmOverloads constructor(
|
|||||||
pinDrawable?.let { drawable ->
|
pinDrawable?.let { drawable ->
|
||||||
if (!safeMapRefs.style.isFullyLoaded ||
|
if (!safeMapRefs.style.isFullyLoaded ||
|
||||||
safeMapRefs.style.getImage(state.pinId) == null) {
|
safeMapRefs.style.getImage(state.pinId) == null) {
|
||||||
safeMapRefs.style.addImage(state.pinId, drawable)
|
safeMapRefs.style.addImage(state.pinId, drawable.toBitmap())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user