Skip to content

AztecTagHandler loadingDrawable miss match xml set resource #532

Open
@liufsd

Description

@liufsd

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)
        }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions