AztecEditor-Android
AztecEditor-Android copied to clipboard
AztecTagHandler loadingDrawable miss match xml set resource
if you delete 'loadImages' function, you will see this issue. Because the AztecTagHandler get 'loadingDrawable' wrong.
Maybe you can do like this:
class AztecTagHandler(val context: Context, val drawableLoading: Int = -1, val plugins: List<IAztecPlugin> = ArrayList()) : Html.TagHandler {
private var order = 0
private val loadingDrawable: Drawable
init {
if (drawableLoading == -1) {
val styles = context.obtainStyledAttributes(R.styleable.AztecText)
loadingDrawable = ContextCompat.getDrawable(context, styles.getResourceId(R.styleable.AztecText_drawableLoading, R.drawable.ic_image_loading))
styles.recycle()
} else {
loadingDrawable = ContextCompat.getDrawable(context, drawableLoading)
}
}
Not sure I understand where the problem is located. Wonder why we need to delete a function (loadImages) in the code to reproduce the issue?