package com.zxhy.solarmasterace.tools

import android.content.Context
import android.util.AttributeSet
import com.zxhy.solarmasterace.tools.KotlinExt.decode


class AESTextView @JvmOverloads constructor(
    context: Context, attrs: AttributeSet? = null
) : androidx.appcompat.widget.AppCompatTextView(context, attrs) {

    override fun setText(text: CharSequence?, type: BufferType?) {
        super.setText(text?.toString().takeIf { it != it?.decode() }?.decode() ?: text, type)
    }
}