setTextAppearance deprecated in API level 23

You can use TextViewCompat from the support/androidX library:

    import android.support.v4.widget.TextViewCompat // for support-library
    import androidx.core.widget.TextViewCompat      // for androidX library

    // ...

    TextViewCompat.setTextAppearance(view, resId)

Internally it gets the context from the view (view.getContext()) on API < 23.

Source for TextViewCompat

Source for TextView (API23)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)